All exceptions from Python apps are automatically captured by Atatus. If you wish to send exceptions manually, you can do so by using the client.capture_exception() method.

Compatibility

Compatible with all Python agent versions.

Syntax

copy
icon/buttons/copy
client.capture_exception()

Examples

copy
icon/buttons/copy
import atatus
client = atatus.get_client()

try:
    x = int(input("Please enter a number: "))
except ValueError:
    client.capture_exception()
copy
icon/buttons/copy
import atatus
client = atatus.get_client()

try:
    subscription.update(data)
except ValueError:
    client.capture_message('Subscription update failed.')