summaryrefslogtreecommitdiff
path: root/lib/querystring.js
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-02-27 14:55:32 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-05 19:51:30 +0100
commit1e8d110e640c658e4f6ed7540db62d063269ba6c (patch)
treeafe2636b1b190fee00006beaa484fa77d5949770 /lib/querystring.js
parent023f49c5a938ef631260b76876155eaf957084be (diff)
downloadandroid-node-v8-1e8d110e640c658e4f6ed7540db62d063269ba6c.tar.gz
android-node-v8-1e8d110e640c658e4f6ed7540db62d063269ba6c.tar.bz2
android-node-v8-1e8d110e640c658e4f6ed7540db62d063269ba6c.zip
lib: port errors to new system
This is a first batch of updates that touches non-underscored modules in lib. PR-URL: https://github.com/nodejs/node/pull/19034 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/querystring.js')
-rw-r--r--lib/querystring.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/querystring.js b/lib/querystring.js
index ec6ad51a89..3bedd493f4 100644
--- a/lib/querystring.js
+++ b/lib/querystring.js
@@ -24,7 +24,7 @@
'use strict';
const { Buffer } = require('buffer');
-const errors = require('internal/errors');
+const { ERR_INVALID_URI } = require('internal/errors').codes;
const {
hexTable,
isHexTable
@@ -177,7 +177,7 @@ function qsEscape(str) {
++i;
if (i >= str.length)
- throw new errors.URIError('ERR_INVALID_URI');
+ throw new ERR_INVALID_URI();
var c2 = str.charCodeAt(i) & 0x3FF;