Brian Gianforcaro
2a65db7c12
LibJS: Implement Error.prototype.name setter ( #1776 )
...
The MDN example for creating a custom error type in javascript uses:
function CustomError(foo, message, fileName, lineNumber) {
var instance = new Error(message, fileName, lineNumber);
instance.name = 'CustomError';
instance.foo = foo;
Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
return instance;
}
The name property on the Error prototype needs to be settable for
this to work properly.
2020-04-13 11:19:53 +02:00
..
2020-04-10 13:09:35 +02:00
2020-04-06 18:09:26 +02:00
2020-04-13 01:14:21 +02:00
2020-04-10 13:09:35 +02:00
2020-04-13 01:14:21 +02:00
2020-04-07 17:25:50 +02:00
2020-04-10 13:09:35 +02:00
2020-04-07 08:41:25 +02:00
2020-04-10 13:09:35 +02:00
2020-04-10 13:09:35 +02:00
2020-04-12 18:42:42 +02:00
2020-04-12 18:42:42 +02:00
2020-04-13 01:14:21 +02:00
2020-04-10 13:09:35 +02:00
2020-04-10 14:06:52 +02:00
2020-04-13 11:19:53 +02:00
2020-04-13 01:14:21 +02:00
2020-04-10 14:06:52 +02:00
2020-04-13 11:19:53 +02:00
2020-04-13 11:19:53 +02:00
2020-04-11 14:10:42 +02:00
2020-04-13 01:14:21 +02:00
2020-04-13 01:14:21 +02:00
2020-04-10 14:14:02 +02:00
2020-04-10 14:06:52 +02:00
2020-04-12 14:39:38 +02:00
2020-04-06 10:58:16 +02:00
2020-04-13 01:14:21 +02:00
2020-04-13 01:14:21 +02:00
2020-04-13 01:14:21 +02:00
2020-04-07 21:28:43 +02:00
2020-04-10 13:09:35 +02:00
2020-04-10 13:09:35 +02:00
2020-04-10 13:09:35 +02:00
2020-04-11 14:10:42 +02:00
2020-04-10 00:36:06 +02:00
2020-04-13 01:14:21 +02:00
2020-04-10 00:36:06 +02:00
2020-04-06 20:27:44 +02:00
2020-04-11 14:10:42 +02:00
2020-04-11 14:10:42 +02:00
2020-04-10 16:33:44 +02:00
2020-04-10 16:33:44 +02:00
2020-04-13 01:14:21 +02:00
2020-04-10 14:14:02 +02:00
2020-04-10 13:09:35 +02:00
2020-04-10 16:37:04 +02:00
2020-04-10 16:37:04 +02:00
2020-04-12 14:39:38 +02:00
2020-04-12 14:39:38 +02:00