Lines Matching refs:error
346 * Returns an error object indicating that the specified import is not defined.
350 * @returns {ERR_PACKAGE_IMPORT_NOT_DEFINED} - The error object.
359 * Returns an error object indicating that the specified subpath was not exported by the package.
363 * @returns {ERR_PACKAGE_PATH_NOT_EXPORTED} - The error object.
372 * Throws an error indicating that the given request is not a valid subpath match for the specified pattern.
389 * Creates an error object for an invalid package target.
395 * @returns {ERR_INVALID_PACKAGE_TARGET} - The error object.
1029 * Throw an error if an import is not allowed.
1094 * Throws an error if the parent URL is invalid or if the resolution is disallowed by the policy manifest.
1199 } catch (error) {
1202 if (error.code === 'ERR_MODULE_NOT_FOUND' ||
1203 error.code === 'ERR_UNSUPPORTED_DIR_IMPORT') {
1207 decorateErrorWithCommonJSHints(error, specifier, parentURL);
1209 throw error;
1221 * Decorates the given error with a hint for CommonJS modules.
1222 * @param {Error} error - The error to decorate.
1226 function decorateErrorWithCommonJSHints(error, specifier, parentURL) {
1230 const lines = StringPrototypeSplit(error.stack, '\n');
1232 error.stack =
1236 error.message += `\n${hint}`;