Skip to content

Instantly share code, notes, and snippets.

@weslleyaraujo
Created June 3, 2016 13:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weslleyaraujo/0977ae76fc576ac11660592809998699 to your computer and use it in GitHub Desktop.
Save weslleyaraujo/0977ae76fc576ac11660592809998699 to your computer and use it in GitHub Desktop.
const crashReporter = store => next => action => {
try {
return next(action)
} catch (err) {
console.error('Caught an exception!', err)
// capture error somehow here: action, store.getState()
throw err;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment