Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_custom_exceptions-0.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_custom_exceptions-0.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file python_custom_exceptions-0.0.2.tar.gz.

File metadata

File hashes

Hashes for python_custom_exceptions-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2c40ce016ce88cbc928585409eecea8368d69f6f9b8c4f164b5518ca57df86d6
MD5 22acce9a688466e54571ddc1aad3fa73
BLAKE2b-256 863527c1322c6c03551b05cfdf35f1f116c4b2d9300d04a53ad05d500ebd143b

See more details on using hashes here.

File details

Details for the file python_custom_exceptions-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_custom_exceptions-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2b05241c06ebc6f72a0438e696d4b38884f6f3c8847b58cce4136ad6d4c27089
MD5 988059e5ec0c7e7478cb300066a71d26
BLAKE2b-256 7f18c175e05069d5e6f08e2ee26c00c9b5fb09481a1c27ef10c267806740b029

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page