Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

err strategy #235

Open
laurelnaiad opened this issue Sep 29, 2013 · 2 comments
Open

err strategy #235

laurelnaiad opened this issue Sep 29, 2013 · 2 comments

Comments

@laurelnaiad
Copy link
Contributor

I'm trying to understand the strategy around error handling. Is there a document I missed?

I see cases where errors are thrown and where errors are logged and passed to next.

is it safe to say that one should throw errors that will be fatal anyway and pass them to next if there's hope that the process can otherwise functionally survive?

@richtera
Copy link
Collaborator

Good discussion to have. My thoughts on this

Errors should usually be logged unless they are expected. For example when
the user closes the page mid response there is no reason the put that in
the log.

Errors should not be shown to the user unless they are meaningful.
Especially if they might reveal something.

Errors need to be thrown or passed on if they prevent further work to be
done.

Andy

Sent from my iPhone

On Sep 28, 2013, at 8:42 PM, Stu Salsbury [email protected] wrote:

I'm trying to understand the strategy around error handling. Is there a
document I missed?

I see cases where errors are thrown and where errors are logged and passed
to next.

is it safe to say that


Reply to this email directly or view it on
GitHubhttps://github.com//issues/235
.

@laurelnaiad
Copy link
Contributor Author

Errors need to be thrown or passed on if they prevent further work to be
done.

I guess that's why I'm asking -- when I've passed err's to next in calipso it doesn't seem to stop a later error from occurring -- as if no error handler snapped up the error. That's why I looked around and ended up finding cases where errors are thrown instead (which I assume are crashing the process).

If the error is should be fatal, is that the way to create a fatal error? And otherwise log as appropriate and pass to next?

@laurelnaiad laurelnaiad reopened this Sep 29, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants