exception handling #152

Closed
heydiplo opened this Issue Feb 28, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@heydiplo

Hey guys,

I can't figure out the best way to catch exceptions. Marty seems to catch everything and makes error logging to an external service really tricky. I ended up listening to ACTION_FAILED events, but this way I only got stack trace string, not the error itself (to get it through TraceKit, for example).

Also, when something bad happens on component render when fetch is done, fetch just fails silently, and I haven't found a way to catch it.

This issues makes debugging and even development a pain sometimes.

Maybe I missing something and there's a better way?

Maybe we should introduce some error catching layer, so we can just throw them in development, and ignore or delegate to some reporting library in production?

@jhollingworth

This comment has been minimized.

Show comment
Hide comment
@jhollingworth

jhollingworth Mar 1, 2015

Contributor

Difficulties tracking errors is something thats come up a few times now. #127 was an effort to improve the situation but it's definitely not solved.

Right now we assume that all errors that occur in an action are intentional and thus should result in a failed action. It seems that its far more common for errors to come from development/debugging. I don't believe its possible to distinguish between the two types of error I believe our current approach is flawed.

I'm starting to think we should completely the ability to automatically fail an action and make that something explicit the developer has to do. What do you think?

Contributor

jhollingworth commented Mar 1, 2015

Difficulties tracking errors is something thats come up a few times now. #127 was an effort to improve the situation but it's definitely not solved.

Right now we assume that all errors that occur in an action are intentional and thus should result in a failed action. It seems that its far more common for errors to come from development/debugging. I don't believe its possible to distinguish between the two types of error I believe our current approach is flawed.

I'm starting to think we should completely the ability to automatically fail an action and make that something explicit the developer has to do. What do you think?

@jhollingworth

This comment has been minimized.

Show comment
Hide comment
@jhollingworth

jhollingworth Mar 6, 2015

Contributor

#166 should be a help here

Contributor

jhollingworth commented Mar 6, 2015

#166 should be a help here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment