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.

32 lines
691 B

1 year ago
'use strict'
var formatter = require('format')
var fault = create(Error)
module.exports = fault
fault.eval = create(EvalError)
fault.range = create(RangeError)
fault.reference = create(ReferenceError)
fault.syntax = create(SyntaxError)
fault.type = create(TypeError)
fault.uri = create(URIError)
fault.create = create
// Create a new `EConstructor`, with the formatted `format` as a first argument.
function create(EConstructor) {
FormattedError.displayName = EConstructor.displayName || EConstructor.name
return FormattedError
function FormattedError(format) {
if (format) {
format = formatter.apply(null, arguments)
}
return new EConstructor(format)
}
}