Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handling errors could be improved #3

Open
bestform opened this issue Aug 4, 2016 · 1 comment
Open

handling errors could be improved #3

bestform opened this issue Aug 4, 2016 · 1 comment

Comments

@bestform
Copy link

bestform commented Aug 4, 2016

In a lot of places, possible errors will just be given to the Check function, which logs the error and happily continues on. This can result in runtime errors. Some instances are:

Check(err)

Here it is just assumed that opening the database connection will be successful. It will log an error, should one happen, but it will blindly run into the call at line 92.

Same thing on

Check(err)
and the following lines.

I think those errors could be handled more gracefully.

In addition, I'd recommend renaming the Check function into something like LogError. This way, it is obvious what the function actually does.

@ewhal
Copy link
Owner

ewhal commented Aug 4, 2016

I did want to improve error handling at some point in time and I should probably get on that.
Good idea with renaming Check to LogErrror.

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

No branches or pull requests

2 participants