Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
exception handling #152
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?
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?