Python Custom Exceptions
A repository containing custom exception classes for Python projects.
These exceptions are designed to provide more specific error handling and improve code readability.
They can be easily integrated into any Python application to enhance error management.
Features
- ✅ Specific Exception Classes: Custom exceptions for various error scenarios.
- ✅ Improved Readability: Clearer error handling in code.
- ✅ Easy Integration: Simple to add to existing Python projects.
- ✅ Standardized Error Handling: Consistent approach to managing exceptions.
- ✅ Structured Hierarchy: Organized exception classes for better maintainability.
Installation
pip install python-custom-exceptions
Usage Examples
import os
from python_custom_exceptions import DiagnosticInfo, IsNotExistException
class DiagnosticInfoTest(DiagnosticInfo):
file_path: str
file_path = "test_dir"
os.mkdir(file_path)
if not os.path.exists(file_path):
raise IsNotExistException(
subject="Directory",
diagnostic_info=DiagnosticInfoTest(
file_path=file_path
)
)
🤝 Contributing
If you have a helpful tool, pattern, or improvement to suggest:
Fork the repo
Create a new branch
Submit a pull request
I welcome additions that promote clean, productive, and maintainable development.
🙏 Thanks
Thanks for exploring this repository!
Happy coding!
Release files for python-custom-exceptions 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_custom_exceptions-0.0.2.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_custom_exceptions-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / python_custom_exceptions-0.0.2.tar.gz
| Download URL | python_custom_exceptions-0.0.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c40ce016ce88cbc928585409eecea8368d69f6f9b8c4f164b5518ca57df86d6
|
|
BLAKE2b-256 checksum How to use checksums |
863527c1322c6c03551b05cfdf35f1f116c4b2d9300d04a53ad05d500ebd143b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / python_custom_exceptions-0.0.2-py3-none-any.whl
| Download URL | python_custom_exceptions-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b05241c06ebc6f72a0438e696d4b38884f6f3c8847b58cce4136ad6d4c27089
|
|
BLAKE2b-256 checksum How to use checksums |
7f18c175e05069d5e6f08e2ee26c00c9b5fb09481a1c27ef10c267806740b029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|