Skip to content

handling errors could be improved #3

@bestform

Description

@bestform

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions