mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 06:53:18 +08:00
more pcommandbatch error handling polishing
This commit is contained in:
parent
bd6ff6717a
commit
5e750d562c
@ -57,6 +57,7 @@ import time
|
|||||||
import json
|
import json
|
||||||
import asyncio
|
import asyncio
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import traceback
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
@ -343,14 +344,14 @@ class Server:
|
|||||||
f' {resultcode}.',
|
f' {resultcode}.',
|
||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception:
|
||||||
if VERBOSE:
|
print(
|
||||||
print(
|
f'pcommandbatch server {self._instance}'
|
||||||
f'pcommandbatch server {self._instance}'
|
f' (pid {self._pid}):'
|
||||||
f' (pid {self._pid}):'
|
f' error on request {request_id}:',
|
||||||
f'error on request {request_id}: {exc}.',
|
file=sys.stderr,
|
||||||
file=sys.stderr,
|
)
|
||||||
)
|
traceback.print_exc()
|
||||||
resultcode = 1
|
resultcode = 1
|
||||||
logpath = self._worker_log_file_path.removeprefix(
|
logpath = self._worker_log_file_path.removeprefix(
|
||||||
f'{self._project_dir}/'
|
f'{self._project_dir}/'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user