Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improve exception handling in persist_event #2834

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Jan 29, 2018

  1. use deferred.errback() instead of deferred.errback(e), which means that
    a Failure object will be constructed using the current exception state,
    including its stack trace - so the stack trace is saved in the Failure,
    leading to better exception reports.

  2. Set consumeErrors=True on the ObservableDeferred, because we know that
    there will always be at least one observer - which avoids a spurious "CRITICAL:
    unhandled exception in Deferred" error in the logs

1. use `deferred.errback()` instead of `deferred.errback(e)`, which means that
a Failure object will be constructed using the current exception state,
*including* its stack trace - so the stack trace is saved in the Failure,
leading to better exception reports.

2. Set `consumeErrors=True` on the ObservableDeferred, because we know that
there will always be at least one observer - which avoids a spurious "CRITICAL:
unhandled exception in Deferred" error in the logs
@richvdh richvdh merged commit 518a745 into develop Jan 31, 2018
@richvdh richvdh deleted the rav/better_persist_event_exception_handling branch February 1, 2018 13:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants