Exasol Python Error Reporting
Project description
Exasol Error Reporting
This project contains a Python library for describing Exasol error messages. This library lets you define errors with a uniform set of attributes. Furthermore, the error message is implemented to be parseable, so that you can extract an error catalog from the code.
In a Nutshell
Install the library
pip install exasol-error-reporting
Create a Simple Error
from exasol import error
error1 = error.ExaError(
"E-TEST-1", "A trivial error", "No mitigation available", {}
)
Specify Multiple Mitigations
from exasol import error
error2 = error.ExaError(
"E-TEST-2",
message="Fire in the server room",
mitigations=[
"Use the fire extinguisher",
"Flood the room with halon gas (Attention: make sure no humans are in the room!)"
],
parameters={}
)
Error Parameter(s) without description
from exasol import error
error3 = error.ExaError(
"E-TEST-2",
"Not enough space on device {{device}}.",
"Delete something from {{device}}.",
{"device": "/dev/sda1"},
)
Error with detailed Parameter(s)
from exasol import error
from exasol.error import Parameter
error4 = error.ExaError(
"E-TEST-2",
"Not enough space on device {{device}}.",
"Delete something from {{device}}.",
{"device": Parameter("/dev/sda1", "name of the device")},
)
Check out the user guide for more details.
Tooling
The exasol-error-reporting
library comes with a command line tool (ec
) which also can be invoked
by using its package/module entry point (python -m exasol.error
).
For detailed information about the usage consider consulting the help ec --help
or python -m exasol.error --help
.
Parsing the error definitions in a python file(s)
ec parse some-python-file.py
ec parse < some-python-file.py
Generating an error-code data file
In order to generate a error-code-report compliant data file, you can use the generate subcommand.
ec generate NAME VERSION PACKAGE_ROOT > error-codes.json
Links and References
For further details check out the project documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file exasol_error_reporting-0.5.0.tar.gz
.
File metadata
- Download URL: exasol_error_reporting-0.5.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5051f9a0dc9dbfc2dfa808d6b88c7595fa2688aa11a2b51c0895db00fe3e41bb |
|
MD5 | c438a898c960e9d04a8075a4bb1fa06a |
|
BLAKE2b-256 | d496e3369bf1761f6dd633e14b2e6f1625ff90dec50a0873399d49e69b2504a7 |
File details
Details for the file exasol_error_reporting-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: exasol_error_reporting-0.5.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17a5e6cd862e79796ae9acd62f7d0dd13c485ad4a4d7467bb7f8d57c1c213d5e |
|
MD5 | 0d96643638833ee9cebed5f82087a975 |
|
BLAKE2b-256 | 62a5d72ff9de442e9ea37bd9141eda5c227982ea009da77dc73ed3aa77e40014 |