This commit is contained in:
Ilya Kantor 2017-03-28 10:55:51 +03:00
parent e76364de01
commit bc9117e70f
10 changed files with 15 additions and 15 deletions

View file

@ -47,13 +47,13 @@ class ValidationError extends Error {
}
function test() {
throw new ValidationError("Wops!");
throw new ValidationError("Woops!");
}
try {
test();
} catch(err) {
alert(err.message); // Wops!
alert(err.message); // Woops!
alert(err.name); // ValidationError
alert(err.stack); // a list of nested calls with line numbers for each
}