mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
replaces logger.error with logger.exception to get stack trace
This commit is contained in:
parent
2bcc6b9660
commit
3c99f3fe04
@ -258,7 +258,7 @@ class Server:
|
||||
except asyncio.CancelledError:
|
||||
logger.debug("Cancelled '%s' server.", server_name)
|
||||
except Exception as e:
|
||||
logger.error("Unexpected exception: %s", e)
|
||||
logger.exception("Unexpected exception: %s", e)
|
||||
|
||||
async def __cancel_tasks(self) -> None:
|
||||
for task in asyncio.all_tasks(self._loop):
|
||||
|
@ -111,8 +111,7 @@ class Task(pydase.data_service.data_service.DataService, Generic[R]):
|
||||
|
||||
exception = task.exception()
|
||||
if exception is not None:
|
||||
# Handle the exception, or you can re-raise it.
|
||||
logger.error(
|
||||
logger.exception(
|
||||
"Task '%s' encountered an exception: %s: %s",
|
||||
self._func_name,
|
||||
type(exception).__name__,
|
||||
|
@ -393,7 +393,7 @@ def set_nested_value_by_path(
|
||||
current_dict, path_parts[-1], allow_append=True
|
||||
)
|
||||
except (SerializationPathError, KeyError) as e:
|
||||
logger.error("Error occured trying to change %a: %s", path, e)
|
||||
logger.exception("Error occured trying to change %a: %s", path, e)
|
||||
return
|
||||
|
||||
if next_level_serialized_object["type"] == "method": # state change of task
|
||||
|
Loading…
x
Reference in New Issue
Block a user