A collection of custom exceptions for Python projects.
Project description
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!
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_custom_exceptions-0.0.2.tar.gz.
File metadata
- Download URL: python_custom_exceptions-0.0.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c40ce016ce88cbc928585409eecea8368d69f6f9b8c4f164b5518ca57df86d6
|
|
| MD5 |
22acce9a688466e54571ddc1aad3fa73
|
|
| BLAKE2b-256 |
863527c1322c6c03551b05cfdf35f1f116c4b2d9300d04a53ad05d500ebd143b
|
File details
Details for the file python_custom_exceptions-0.0.2-py3-none-any.whl.
File metadata
- Download URL: python_custom_exceptions-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b05241c06ebc6f72a0438e696d4b38884f6f3c8847b58cce4136ad6d4c27089
|
|
| MD5 |
988059e5ec0c7e7478cb300066a71d26
|
|
| BLAKE2b-256 |
7f18c175e05069d5e6f08e2ee26c00c9b5fb09481a1c27ef10c267806740b029
|