Skip to main content

Set of custom exceptions aimed to reduce typing.

Project description

hed_exceptions

Set of custom exceptions aimed to reduce typing.

Details

I wander why Python is lacking similar builtin types...

Catalog

  • ArgumentError

      def charge(me):
          raise ArgumentError("me")
    
      def recharge(me):  
          raise ArgumentError("me", "Plug not found!")
      ...
      charge("money") 
      # ArgumentError('Bad arg!', Arg(name='me', type=<class 'str'>, value='money'))
      ...
      recharge("battery")
      # ArgumentError('Plug not found!', Arg(name='me', type=<class 'str'>, value='battery'))
    

Dependencies

  • None

Installation

pip install hed_exceptions

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

hed_exceptions-0.0.4.tar.gz (4.2 kB view hashes)

Uploaded source

Built Distribution

hed_exceptions-0.0.4-py3-none-any.whl (3.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page