-
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
Showing
10 changed files
with
373 additions
and
116 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,23 +1,49 @@ | ||
|
||
/** | ||
* OutOfRangeError extends Error | ||
* is thrown when the input is out of range | ||
* @memberof DecimalToRomanConversion | ||
*/ | ||
class OutOfRangeError extends Error { | ||
constructor (message) { | ||
super(message); | ||
this.name = 'OutOfRangeError'; | ||
} | ||
/** | ||
* Initializes a new OutOfRangeError, using the supplied message; | ||
* @param {string} message is the supplied message to the error. | ||
*/ | ||
constructor (message) { | ||
super(message); | ||
this.name = 'OutOfRangeError'; | ||
} | ||
} | ||
|
||
/** | ||
* InvalidInputError | ||
* is thrown when the input is not valid. | ||
* @memberof DecimalToRomanConversion | ||
*/ | ||
class InvalidInputError extends Error { | ||
constructor (message) { | ||
super(message); | ||
this.name = 'InvalidInputError'; | ||
} | ||
/** | ||
* Initializes a new InvalidError, using the supplied message; | ||
* @param {string} message is the supplied message to the error. | ||
*/ | ||
constructor (message) { | ||
super(message); | ||
this.name = 'InvalidInputError'; | ||
} | ||
} | ||
|
||
/** | ||
* MissingParameterError | ||
* is thrown when the input is not provided. | ||
* @memberof DecimalToRomanConversion | ||
*/ | ||
class MissingParameterError extends Error { | ||
constructor (message) { | ||
super(message); | ||
this.name = 'MissingParameterError'; | ||
} | ||
/** | ||
* Initializes a new MissingParameterError, using the supplied message; | ||
* @param {string} message is the supplied message to the error. | ||
*/ | ||
constructor (message) { | ||
super(message); | ||
this.name = 'MissingParameterError'; | ||
} | ||
} | ||
|
||
module.exports = { OutOfRangeError, InvalidInputError, MissingParameterError }; |
Oops, something went wrong.