License: Apache 2.0
VERSION INFO:
$Repo: async_example_program $Author: Anders Wiklund $Date: 2023-10-14 12:00:19 $Rev: 37
| Function | error |
Return a populated ErrorMessage. |
| Function | error |
Return exception context and error text. |
| Function | get |
Return Exception context (filename, location and line number). |
| Function | has |
Return exception traceback frame status. |
| Function | traceback |
Return exception traceback as a string. |
| Constant | EXTERNAL |
Root paths to third party and standard python modules (virtual or not). |
| Constant | SUBJECT |
Subject template text based on error state. |
Exception, program: str, state: str, include_traceback: bool = True) -> dict:
(source)
¶
Return a populated ErrorMessage.
When include_traceback=True, an exception traceback is attached to the description.
| Parameters | |
error:Exception | Current exception. |
program:str | Current program. |
state:str | Current error state. |
includebool | Include traceback status (default is True). |
| Returns | |
dict | A populated ErrorMessage. |
Exception, include_traceback: bool = False, extra: Optional[ str] = None) -> str:
(source)
¶
Return exception context and error text.
When include_traceback=True, an exception traceback is appended to the text.
When the extra parameter is specified, that text is inserted after the location and before the reason.
The logical structure of the error test is:
<location> [<extra>] <reason> [<BR><traceback>]
| Parameters | |
error:Exception | Current exception. |
includebool | Include traceback status. |
extra:Optional[ | Additional error text. |
| Returns | |
str | Exception context and error text (+ eventual traceback). |
Return Exception context (filename, location and line number).
Traverse the traceback stack from the last frame backwards to the first since that starts closest to the raised exception, and find the first frame where the filename isn't found in the standard python library or from any of the imported site-packages.
Then you have found what triggered the exception in our own code.
| Returns | |
str | Error context ("<filename>[<location>(<lineno>)]"). |
Root paths to third party and standard python modules (virtual or not).
| Value |
|