Skip to content

Commit

Permalink
print full error traceback (#769)
Browse files Browse the repository at this point in the history
* print full error traceback

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* bump version

* Update queue.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
PythonFZ and pre-commit-ci[bot] authored Dec 13, 2024
1 parent 2160654 commit 083a87e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zndraw"
version = "0.5.6"
version = "0.5.7"
description = "Display and Edit Molecular Structures and Trajectories in the Browser."
authors = ["zincwarecode <[email protected]>"]
license = "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)"
Expand Down
8 changes: 6 additions & 2 deletions zndraw/queue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import traceback
import typing as t

import socketio.exceptions
Expand Down Expand Up @@ -92,7 +93,10 @@ def run_queued_task(
try:
queue[TASK_RUNNING] = True
cls(**task).run(vis, **run_kwargs)
except Exception as err:
vis.log(f"Error running `{cls}`: `{err}`")
except Exception:
vis.log(f"""Error running `{cls}`:
```python
{traceback.format_exc()}
```""")
finally:
queue.pop(TASK_RUNNING)

0 comments on commit 083a87e

Please sign in to comment.