Rise class for formatting thrown exception messages.
Project description
RaiseTool
The project contains small class for formatting thrown exception messages.
The message can be formatted with information about the class, method, and line number where the exception was thrown.
Usage examples
import inspect
from raisetool.formatter import Raise
class Example:
def __init__(self):
print("1: " + Raise.message("example message 1"))
print("2: " + Raise.message("example message 2", self.__class__.__name__))
print("3: " + Raise.message("example message 3", self.__class__.__name__, inspect.currentframe()))
obj = Example()
Output:
1: example message 1
2: Example: example messace 2
3: Example.__init__ [line:9]: example message 3
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
raisetool-0.1.14.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for raisetool-0.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf217930c4c11663c44347347f841f15dcecc49393bb6c8ee5ad06260698393a |
|
MD5 | 97a3432719bf2d3596c024bd2df7f115 |
|
BLAKE2b-256 | c879701bc533b6a4678b575ccfe5ca4b371c6b6007384e6051f39dd511235754 |