From 110a2b2d2a5a8d0ce02da072ff8322548d6d2c1a Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Fri, 21 Sep 2018 15:23:01 -0600 Subject: [PATCH] Quick exception handler for framework This should be improved later. --- src/spectator.cr | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/spectator.cr b/src/spectator.cr index e3554e7..c9ee602 100644 --- a/src/spectator.cr +++ b/src/spectator.cr @@ -13,6 +13,14 @@ module Spectator end at_exit do - Runner.new(ExampleGroup::ROOT).run + begin + Runner.new(ExampleGroup::ROOT).run + rescue ex + puts + puts "Encountered an unexpected error in framework" + puts ex.message + puts ex.backtrace.join("\n") + exit(1) + end end end