From: Tollef Fog Heen Date: Mon, 10 Mar 2014 09:24:26 +0000 (+0100) Subject: Nicer error messages when used interactively X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=inline;p=pwstore Nicer error messages when used interactively --- diff --git a/pws.rb b/pws.rb index d90c940..14424f1 100755 --- a/pws.rb +++ b/pws.rb @@ -1014,7 +1014,12 @@ def parse_command end if __FILE__ == $0 - parse_command + begin + parse_command + rescue RuntimeError => e + STDERR.puts e.message + exit(1) + end end # vim:set shiftwidth=2: