Skip to main content

Simplified exception handling for Python

Project description

pytrycatch

from pytrycatch import handle_errors

@handle_errors(log=True, default_return="safe fallback")
def risky_operation():
    return 1 / 0

print(risky_operation())  # Output: "safe fallback"

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

pytrycatch-0.0.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

pytrycatch-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file pytrycatch-0.0.1.tar.gz.

File metadata

  • Download URL: pytrycatch-0.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pytrycatch-0.0.1.tar.gz
Algorithm Hash digest
SHA256 11697302904c19478fba3ae010785d51f4b50afeff914a344d7f9c027ecf57d0
MD5 fb1a70e5ee594d87c58aa7280eb04354
BLAKE2b-256 ba58eedbe8c85da7118e6981c0a365d4fe7576fc2185b89ec1fa5026075416d7

See more details on using hashes here.

File details

Details for the file pytrycatch-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytrycatch-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pytrycatch-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5242aaddcfdd2f780d56060b0d8a6be78d86a9ad814b9b26aaa504bd5df0f42
MD5 aa334d5e88bfb28d3ab0a2bef95115a2
BLAKE2b-256 12b2c9753b88bd36187f8aad36c7c64d15201cce93c99d231f6057c6724f204f

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