diff options
Diffstat (limited to 'util/sidparse.ml')
-rw-r--r-- | util/sidparse.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/sidparse.ml b/util/sidparse.ml index 5ab6bf4..ba0efc2 100644 --- a/util/sidparse.ml +++ b/util/sidparse.ml @@ -31,8 +31,9 @@ let handle_input q v s = match String.trim s with | "" -> `Nothing | s -> - try `Done (Sid.of_string s) - with Invalid_argument e -> err q v "ERROR: %s\n%!" e; `Junk + (match Sid.of_string s with + | Ok s -> `Done s + | Error e -> err q v "ERROR: %s\n%!" e; `Junk) let from_argv sids = let rest = ref sids in |