marcglasberg / async_redux

Flutter Package: A Redux version tailored for Flutter, which is easy to learn, to use, to test, and has no boilerplate. Allows for both sync and async reducers.
Other
234 stars 40 forks source link

Add StackTrace to wrapError and ErrorObserver #72

Closed dluksza closed 4 years ago

dluksza commented 4 years ago

Dart API and syntax is a bit wired when it comes to exceptions. Exception is an object that doesn't include a stack trace information. The stack trace is provided as a second optional parameter in catch capsule eg:

try {
  throw UserError();
} catch(e, stackTrace) {
  action.wrapError(e, stackTrace);
}

Having StackTrace object in wrapError and ErrorObserver interface would enable us to send both to error reporting services like Crashlytics and also make easier to understand the underlying issue.

marcglasberg commented 4 years ago

Could you please check if the current version in GitHub (not the one published in pub.dev) solves your issue?

dluksza commented 4 years ago

@marcglasberg I've looked at latest commit on master and it should solve my issue. Thank you!