diff options
| author | a14m <[email protected]> | 2020-12-06 16:17:16 +0100 |
|---|---|---|
| committer | a14m <[email protected]> | 2020-12-06 16:17:16 +0100 |
| commit | 26ae9530666ccea5815c4151c2088158450050ba (patch) | |
| tree | db51c648ee107abe15ef24f980a27eb525e1701a /CLI/ruby/bin | |
| parent | c7a80df29dac0cb5a7b5bd78a750c15fd6146908 (diff) | |
Handle CLI errors and report error message back to user
Diffstat (limited to 'CLI/ruby/bin')
| -rwxr-xr-x | CLI/ruby/bin/game-of-life | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/CLI/ruby/bin/game-of-life b/CLI/ruby/bin/game-of-life index b490e1a..f83d72b 100755 --- a/CLI/ruby/bin/game-of-life +++ b/CLI/ruby/bin/game-of-life @@ -60,6 +60,10 @@ begin CLI.start(ARGV) rescue SystemExit, Interrupt "Do nothing when user exits with Interrupt (CMD/Ctrl + C)" -rescue NotImplementedError - puts "Seed option isn't implemented yet, please use --input option" +rescue NotImplementedError => e + puts e.message + exit(-1) +rescue GameOfLife::Error => e + puts e.message + exit(-1) end |
