Context Manager¶
danling.utils.contextmanagers
¶
debug
¶
Python | |
---|---|
Contextmanager to enter debug mode on error
except for exclude
.
debug
is intended to be used to catch the error and enter debug mode.
Since it is mainly for development purposed, we include an enable
args so that it can be deactivated.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enable |
bool
|
Whether to enable the contextmanager.
Defaults to |
True
|
error |
Exceptions
|
The error to catch.
Defaults to |
Exception
|
exclude |
Optional[Exceptions]
|
The error to exclude.
Defaults to |
None
|