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 Python 3

Supported by

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