[Issue 13764] New: std.getopt: throw an UnknownOptionException rather than Exception

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Nov 22 05:13:26 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13764

          Issue ID: 13764
           Summary: std.getopt: throw an UnknownOptionException rather
                    than Exception
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: danny.milo at gmail.com

It would be nice if std.getopt would throw something like an
UnknownOptionException rather than the very nondescript Exception it does now. 

As it is now, it's hard to tell harmless "user errors" from serious internal
errors. Also, having to use string matching to find out which it is isn't so
nice.

--


More information about the Digitalmars-d-bugs mailing list