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-04 22:28:21 +02:00
2020-04-10 13:09:35 +02:00
2020-04-05 18:07:41 +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-02 15:24:50 +02:00
2020-04-12 18:42:42 +02:00
2020-04-12 18:42:42 +02:00
2020-03-30 14:11:54 +02:00
2020-03-31 21:19:21 +02:00
2020-04-13 01:14:21 +02:00
2020-04-01 20:18:36 +02:00
2020-04-10 13:09:35 +02:00
2020-03-30 21:43: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-03-24 22:21:58 +01:00
2020-03-24 22:21:58 +01:00
2020-04-04 15:58:49 +02:00
2020-04-11 14:10:42 +02:00
2020-04-13 01:14:21 +02:00
2020-04-04 15:58:49 +02:00
2020-04-13 01:14:21 +02:00
2020-04-04 15:58:49 +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-03-29 00:37:33 +01:00
2020-03-29 00:37:33 +01:00
2020-04-13 01:14:21 +02:00
2020-04-07 21:28:43 +02:00
2020-04-04 23:13:13 +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-05 18:19:56 +02:00
2020-03-28 23:10:37 +01:00
2020-04-04 12:58:05 +02:00
2020-04-04 12:58:05 +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