From 5e750d562c5bc540b5a5e2ba658ea905e0dde995 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Thu, 17 Aug 2023 20:49:04 -0500 Subject: [PATCH] more pcommandbatch error handling polishing --- tools/efrotools/pcommandbatch.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/efrotools/pcommandbatch.py b/tools/efrotools/pcommandbatch.py index 01abe87f..ad2e5d51 100644 --- a/tools/efrotools/pcommandbatch.py +++ b/tools/efrotools/pcommandbatch.py @@ -57,6 +57,7 @@ import time import json import asyncio import tempfile +import traceback import subprocess from typing import TYPE_CHECKING @@ -343,14 +344,14 @@ class Server: f' {resultcode}.', file=sys.stderr, ) - except Exception as exc: - if VERBOSE: - print( - f'pcommandbatch server {self._instance}' - f' (pid {self._pid}):' - f'error on request {request_id}: {exc}.', - file=sys.stderr, - ) + except Exception: + print( + f'pcommandbatch server {self._instance}' + f' (pid {self._pid}):' + f' error on request {request_id}:', + file=sys.stderr, + ) + traceback.print_exc() resultcode = 1 logpath = self._worker_log_file_path.removeprefix( f'{self._project_dir}/'