lib/rgot/common.rb in rgot-0.0.2 vs lib/rgot/common.rb in rgot-0.0.3

- old
+ new

@@ -26,31 +26,42 @@ def skip! @skipped = true end - def finished! + def finish! @finished = true end def log(*args) internal_log(sprintf(*args)) end + def skip(*args) + internal_log(sprintf(*args)) + skip_now + end + + def skip_now + skip! + finish! + throw :skip + end + def error(*args) internal_log(sprintf(*args)) fail! end def fatal(msg) internal_log(msg) - fail_now! + fail_now end - def fail_now! + def fail_now fail! - @finished = true - exit 1 + finish! + throw :skip end private def decorate(str)