Bug 11338 – std.uri URIerror should be an Exception
Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-24T02:45:55Z
Last change time
2020-03-21T03:56:33Z
Assigned to
No Owner
Creator
Danny Arends
Comments
Comment #0 by Danny.Arends — 2013-10-24T02:45:55Z
I'd like to be able to use the following code
import std.uri;
string req_uri;
try{
req_uri = decode(unsafeUserString);
}catch(Exception e){
req_uri = "/";
}
Currently it throws an Error... an error (Non-recoverable) is a bit harsh IMHO
Comment #1 by github-bugzilla — 2013-11-01T09:20:07Z