-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Showing
43 changed files
with
560 additions
and
534 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
'use strict'; | ||
|
||
class WarehouseError extends Error { | ||
code?: string; | ||
|
||
/** | ||
* WarehouseError constructor | ||
* | ||
* @param {string} msg | ||
* @param {string} code | ||
*/ | ||
constructor(msg, code) { | ||
constructor(msg: string, code?: string) { | ||
super(msg); | ||
|
||
Error.captureStackTrace(this); | ||
|
||
this.code = code; | ||
} | ||
static ID_EXIST = 'ID_EXIST'; | ||
static ID_NOT_EXIST = 'ID_NOT_EXIST'; | ||
static ID_UNDEFINED = 'ID_UNDEFINED'; | ||
} | ||
|
||
WarehouseError.prototype.name = 'WarehouseError'; | ||
WarehouseError.ID_EXIST = 'ID_EXIST'; | ||
WarehouseError.ID_NOT_EXIST = 'ID_NOT_EXIST'; | ||
WarehouseError.ID_UNDEFINED = 'ID_UNDEFINED'; | ||
|
||
module.exports = WarehouseError; | ||
export = WarehouseError; |
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
'use strict'; | ||
|
||
const WarehouseError = require('../error'); | ||
import WarehouseError = require('../error'); | ||
|
||
class PopulationError extends WarehouseError {} | ||
|
||
PopulationError.prototype.name = 'PopulationError'; | ||
|
||
module.exports = PopulationError; | ||
export = PopulationError; |
Oops, something went wrong.