BLUE
PHP 7.4.33
Path:
/usr/share/nodejs/http2-wrapper/source/utils
Run
Logout
Edit File
Size: 1.45 KB
Close
/usr/share/nodejs/http2-wrapper/source/utils/errors.js
Text
Base64
'use strict'; /* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */ const makeError = (Base, key, getMessage) => { module.exports[key] = class NodeError extends Base { constructor(...args) { super(typeof getMessage === 'string' ? getMessage : getMessage(args)); this.name = `${super.name} [${key}]`; this.code = key; } }; }; makeError(TypeError, 'ERR_INVALID_ARG_TYPE', args => { const type = args[0].includes('.') ? 'property' : 'argument'; let valid = args[1]; const isManyTypes = Array.isArray(valid); if (isManyTypes) { valid = `${valid.slice(0, -1).join(', ')} or ${valid.slice(-1)}`; } return `The "${args[0]}" ${type} must be ${isManyTypes ? 'one of' : 'of'} type ${valid}. Received ${typeof args[2]}`; }); makeError(TypeError, 'ERR_INVALID_PROTOCOL', args => `Protocol "${args[0]}" not supported. Expected "${args[1]}"` ); makeError(Error, 'ERR_HTTP_HEADERS_SENT', args => `Cannot ${args[0]} headers after they are sent to the client` ); makeError(TypeError, 'ERR_INVALID_HTTP_TOKEN', args => `${args[0]} must be a valid HTTP token [${args[1]}]` ); makeError(TypeError, 'ERR_HTTP_INVALID_HEADER_VALUE', args => `Invalid value "${args[0]} for header "${args[1]}"` ); makeError(TypeError, 'ERR_INVALID_CHAR', args => `Invalid character in ${args[0]} [${args[1]}]` ); makeError( Error, 'ERR_HTTP2_NO_SOCKET_MANIPULATION', 'HTTP/2 sockets should not be directly manipulated (e.g. read and written)' );
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
calculate-server-name.js
449 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
check-type.js
473 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
delay-async-destroy.js
652 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
errors.js
1.45 KB
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
is-request-pseudo-header.js
186 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
js-stream-socket.js
237 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
proxy-events.js
149 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
proxy-socket-handler.js
2.33 KB
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validate-header-name.js
385 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validate-header-value.js
400 B
lrw-r--r--
2021-11-20 15:22:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).