-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e692a2
commit 6e3efa7
Showing
3 changed files
with
75 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import ( | ||
"log" | ||
) | ||
|
||
func handleArgumentError(err error) int { | ||
log.Printf("%s", err) | ||
return 1 | ||
} | ||
|
||
func handleDbReadError(err error) int { | ||
log.Printf("error opening database (%s)", err) | ||
return 2 | ||
} | ||
|
||
func handleDbWriteError(err error) int { | ||
log.Printf("error updating database (%s)", err) | ||
return 3 | ||
} | ||
|
||
func handleDbRollbackError(err error) int { | ||
log.Printf("error aborting database changes (%s)", err) | ||
return 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters