From 6dee4a8c28c03e0d07103813ba8b6bd65f8723df Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 10 Mar 2014 10:24:26 +0100 Subject: [PATCH] Nicer error messages when used interactively --- pws.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: -- 2.39.5