diff options
author | flywind <xzsflywind@gmail.com> | 2022-01-03 16:02:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-03 09:02:58 +0100 |
commit | bbd5086bc319dc22971a06ef24d02dc49ff308f3 (patch) | |
tree | 173c043959c7fae02615d1db8e09d339a8252aaa /lib/pure | |
parent | 53e1d57419431050a54dcdf539a2a02bf6d28c5b (diff) | |
download | Nim-bbd5086bc319dc22971a06ef24d02dc49ff308f3.tar.gz |
[docs] clarify the raised exception (#19308)
* [docs] clarify the raised exception Lest developers wanna know what the exception is. * Apply suggestions from @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/uri.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/uri.nim b/lib/pure/uri.nim index a828298c2..7583dbd1e 100644 --- a/lib/pure/uri.nim +++ b/lib/pure/uri.nim @@ -151,10 +151,10 @@ func encodeQuery*(query: openArray[(string, string)], usePlus = true, result.add(encodeUrl(val, usePlus)) iterator decodeQuery*(data: string): tuple[key, value: string] = - ## Reads and decodes query string `data` and yields the `(key, value)` pairs - ## the data consists of. If compiled with `-d:nimLegacyParseQueryStrict`, an - ## error is raised when there is an unencoded `=` character in a decoded - ## value, which was the behavior in Nim < 1.5.1 + ## Reads and decodes the query string `data` and yields the `(key, value)` pairs + ## the data consists of. If compiled with `-d:nimLegacyParseQueryStrict`, + ## a `UriParseError` is raised when there is an unencoded `=` character in a decoded + ## value, which was the behavior in Nim < 1.5.1. runnableExamples: import std/sequtils assert toSeq(decodeQuery("foo=1&bar=2=3")) == @[("foo", "1"), ("bar", "2=3")] |