Update solution.md
Wouldn't this solution be more flexible?
This commit is contained in:
parent
f2501bcf07
commit
2bd1854c55
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
||||||
class FormatError extends SyntaxError {
|
class FormatError extends SyntaxError {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
this.name = "FormatError";
|
this.name = this.constructor.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue