Metadata-Version: 1.2
Name: error-manager
Version: 1.1.1
Summary: Module to manage error code, descriptions and data in a unified way throughout a project
Home-page: https://github.com/MaartendeRuyter/errors
Author: Maarten de Ruyter
Author-email: maarten@geodatagarden.com
License: LGPL-3.0-or-later
Project-URL: Documentation, https://errors.readthedocs.io/
Project-URL: Changelog, https://errors.readthedocs.io/en/latest/changelog.html
Project-URL: Issue Tracker, https://github.com/MaartendeRuyter/errors/issues
Description: =============
        Error Manager
        =============
        
        A lightweight implementation of a manager for error messages throughout your
        project. Allows you to easily define and register error codes and messages.
        Enable easy access to a single list of registerd error codes and messages
        throughout your project.
        
        
        
        
        * Free software: GNU Lesser General Public License v3 or later (LGPLv3+)
        
        Installation
        ============
        
        ::
        
            pip install error-manager
        
        You can also install the in-development version with::
        
            pip install https://github.com/MaartendeRuyter/errors/archive/master.zip
        
        
        Main usecases
        =============
        Error manager provides you with a ``ListErrors`` class to retrieve your
        custom error codes and descriptions throughout your project::
        
            # retrieve customer defined ErrorCode object form ``ListErrors`` class
            >>> from errors.error import ListErrors
            >>> error = ListErrors.COULD_NOT_FIND_ERROR_CODE
            >>> error
            ErrorCode(code='ER_GETERROR_00001', description='Could not find requested 
            error code', error_data=<class 'dict'>)
            
            # add custom error data to error message when you want to persist or log
            # the error
            >>> from errors.base import add_error_data   
            >>> error_with_data = add_error_data(error, {'key': 'Example error data'})
            >>> error_with_data 
            ErrorCode(code='ER_GETERROR_00001', description='Could not find requested error code', error_data={'key': 'Example error data'})
        
        
        Documentation
        =============
        
        https://errors.readthedocs.io/
        
        
        Changelog
        =========
        
        0.1.0 (2021-10-08)
        ------------------
        
        * First release on PyPI.
        
        
        0.9.0 (2021-10-11)
        ------------------
        
        * added error codes as attribut to ListErrors class.
          After registration of an ErrorCode the errorcode is accessible in
          ``ListErrors`` via::
        
              ListErrors.ERROR_CODE_KEY
        
        * Added Documentation and removed default redundant Documentation
          
        1.0.0 (2021-10-12)
        ------------------
        
        * Added Documentation and removed more default but redundant Documentation
        * Added reference documentation for ``ListErrors`` and ``base`` module   
        
        1.1.0 (2021-11-05)
        ------------------
        
        * Added is_error method to check if an object is an instance of
          (sub)class ``ErrorCode``
        
        1.1.1 (2021-11-06)
        ------------------
        
        * Import ``ListErrors``, ``ErrorCode``, ``add_error_data()`` and ``is_error()``
          in ``errors`` ``__init__.py`` so that they can be directly imported from ``errors`` module
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Utilities
Requires-Python: >=3.6
