summaryrefslogtreecommitdiff
path: root/doc/api/url.md
diff options
context:
space:
mode:
authorLovell Fuller <github@lovell.info>2017-03-30 13:21:49 +0100
committerJames M Snell <jasnell@gmail.com>2017-04-04 10:56:21 -0700
commit2ff107dad7faaef617916d84101bb43b73dbd4e6 (patch)
treedc8f7bc4700c19171383aef860821bb9f6c0c513 /doc/api/url.md
parenteefdf452c35fd79d5588d2338989d55ebaf52763 (diff)
downloadandroid-node-v8-2ff107dad7faaef617916d84101bb43b73dbd4e6.tar.gz
android-node-v8-2ff107dad7faaef617916d84101bb43b73dbd4e6.tar.bz2
android-node-v8-2ff107dad7faaef617916d84101bb43b73dbd4e6.zip
test: add case for url.parse throwing a URIError
The auth property of a URL is decoded via decodeURIComponent, which can throw a URIError. The test URL here will trigger this. Adds documentation on the possible errors url.parse can throw. PR-URL: https://github.com/nodejs/node/pull/12135 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/url.md')
-rw-r--r--doc/api/url.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/url.md b/doc/api/url.md
index 7efd85c513..54c6fbdaf2 100644
--- a/doc/api/url.md
+++ b/doc/api/url.md
@@ -259,6 +259,10 @@ added: v0.1.25
The `url.parse()` method takes a URL string, parses it, and returns a URL
object.
+A `TypeError` is thrown if `urlString` is not a string.
+
+A `URIError` is thrown if the `auth` property is present but cannot be decoded.
+
## url.resolve(from, to)
<!-- YAML
added: v0.1.25