This repository has been archived by the owner on Sep 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
License: MIT Signed-off-by: Jacob Heun <[email protected]>
- Loading branch information
Showing
5 changed files
with
40 additions
and
1 deletion.
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,23 @@ | ||
'use strict' | ||
|
||
const errcode = require('err-code') | ||
|
||
module.exports.ERR_DB_CANNOT_OPEN = (err) => { | ||
err = err || new Error('Cannot open database') | ||
return errcode(err, 'ERR_CANNOT_OPEN_DB') | ||
} | ||
|
||
module.exports.ERR_DB_DELETE_FAILED = (err) => { | ||
err = err || new Error('Delete failed') | ||
return errcode(err, 'ERR_DB_DELETE_FAILED') | ||
} | ||
|
||
module.exports.ERR_DB_WRITE_FAILED = (err) => { | ||
err = err || new Error('Write failed') | ||
return errcode(err, 'ERR_DB_WRITE_FAILED') | ||
} | ||
|
||
module.exports.ERR_NOT_FOUND = (err) => { | ||
err = err || new Error('Not Found') | ||
return errcode(err, 'ERR_NOT_FOUND') | ||
} |
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
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