Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.2 KiB
48 lines
2.2 KiB
'use strict';
|
|
var $ = require('../internals/export');
|
|
var global = require('../internals/global');
|
|
var isPrototypeOf = require('../internals/object-is-prototype-of');
|
|
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
|
var setPrototypeOf = require('../internals/object-set-prototype-of');
|
|
var copyConstructorProperties = require('../internals/copy-constructor-properties');
|
|
var create = require('../internals/object-create');
|
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
|
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
|
var clearErrorStack = require('../internals/clear-error-stack');
|
|
var installErrorCause = require('../internals/install-error-cause');
|
|
var iterate = require('../internals/iterate');
|
|
var normalizeStringArgument = require('../internals/normalize-string-argument');
|
|
var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');
|
|
|
|
var Error = global.Error;
|
|
var push = [].push;
|
|
|
|
var $AggregateError = function AggregateError(errors, message /* , options */) {
|
|
var that = isPrototypeOf(AggregateErrorPrototype, this) ? this : create(AggregateErrorPrototype);
|
|
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
if (setPrototypeOf) {
|
|
that = setPrototypeOf(new Error(undefined), getPrototypeOf(that));
|
|
}
|
|
createNonEnumerableProperty(that, 'message', normalizeStringArgument(message, ''));
|
|
if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
|
|
installErrorCause(that, options);
|
|
var errorsArray = [];
|
|
iterate(errors, push, { that: errorsArray });
|
|
createNonEnumerableProperty(that, 'errors', errorsArray);
|
|
return that;
|
|
};
|
|
|
|
if (setPrototypeOf) setPrototypeOf($AggregateError, Error);
|
|
else copyConstructorProperties($AggregateError, Error);
|
|
|
|
var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, {
|
|
constructor: createPropertyDescriptor(1, $AggregateError),
|
|
message: createPropertyDescriptor(1, ''),
|
|
name: createPropertyDescriptor(1, 'AggregateError')
|
|
});
|
|
|
|
// `AggregateError` constructor
|
|
// https://tc39.es/ecma262/#sec-aggregate-error-constructor
|
|
$({ global: true }, {
|
|
AggregateError: $AggregateError
|
|
});
|
|
|