summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-11-11 15:35:15 -0700
committermo khan <mo@mokhan.ca>2014-11-11 15:35:15 -0700
commit50fdc6d72c6ba14e0dbdfa896a4ed54c04f6b0ea (patch)
tree70117c6fb62599961f70fa12a6b1f705ec6dc035
parent5c366de651e0ec2a4708f4b61bb513273ea7457b (diff)
add oops!.
-rw-r--r--lib/urkel.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/urkel.rb b/lib/urkel.rb
index 258e82e..b26f4bc 100644
--- a/lib/urkel.rb
+++ b/lib/urkel.rb
@@ -18,6 +18,11 @@ module Urkel
@connection.publish(error)
end
+ def self.oops!(error)
+ raise InvalidConfigurationError.new unless @connection
+ @connection.publish!(error)
+ end
+
def self.reset
@connection = nil
end