-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #31005: Add traceback information to exceptions during docbuild
The docbuild was failing for me, and it was hard to track down where the original error occurred because there was no (proper) traceback information. In this ticket, such a traceback information is added for exceptions in the docbuild worker following the approach taken in https://bugs.python.org/issue13831. Example output: {{{ sage_setup.docbuild.utils.RemoteException: """ Traceback (most recent call last): File "/mnt/d/Programming/sage/src/sage_setup/docbuild/utils.py", line 179, in run_worker result = target(task) File "/mnt/d/Programming/sage/src/a_test_docbuild_exc.py", line 7, in target 1 / 0 ZeroDivisionError: division by zero """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/mnt/d/Programming/sage/src/a_test_docbuild_exc.py", line 12, in <module> build_many(target, range(8), processes=8) File "/mnt/d/Programming/sage/src/sage_setup/docbuild/utils.py", line 336, in build_many raise worker_exc.original_exception ZeroDivisionError: division by zero }}} for the test file {{{ from sage_setup.docbuild.utils import build_many def target(N): import time, os, signal if N == 1: # Task 4 is a poison pill 1 / 0 else: time.sleep(0.5) print('Processed task %s' % N) build_many(target, range(8), processes=8) }}} URL: https://trac.sagemath.org/31005 Reported by: gh-tobiasdiez Ticket author(s): Tobias Diez Reviewer(s): Michael Orlitzky
- Loading branch information
Showing
1 changed file
with
96 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters