test-unit/lib/test/unit/error.rb in groonga-0.0.6 vs test-unit/lib/test/unit/error.rb in groonga-0.0.7
- old
+ new
@@ -67,21 +67,23 @@
def included(base)
base.exception_handler(:handle_all_exception)
end
end
+ NOT_PASS_THROUGH_EXCEPTIONS = []
PASS_THROUGH_EXCEPTIONS = [NoMemoryError, SignalException, Interrupt,
SystemExit]
private
def handle_all_exception(exception)
case exception
+ when *NOT_PASS_THROUGH_EXCEPTIONS
when *PASS_THROUGH_EXCEPTIONS
- false
- else
- problem_occurred
- add_error(exception)
- true
+ return false
end
+
+ problem_occurred
+ add_error(exception)
+ true
end
def add_error(exception)
current_result.add_error(Error.new(name, exception))
end