refactoring, fix todo removal from lists

This commit is contained in:
2018-05-19 21:45:12 +03:00
parent 97921d6ccc
commit 87ec0ac4d4
7 changed files with 55 additions and 8 deletions

View File

@@ -1,16 +1,18 @@
class NotFoundError extends Error {
constructor(...args) {
constructor(text, ...args) {
super(...args);
Error.captureStackTrace(this, NotFoundError);
this.name = 'NotFound';
this.text = text;
}
}
class BadRequestError extends Error {
constructor(...args) {
constructor(text, ...args) {
super(...args);
Error.captureStackTrace(this, NotFoundError);
this.name = 'BadRequest';
this.text = text;
}
}