lib/isolator/errors.rb in isolator-0.5.0 vs lib/isolator/errors.rb in isolator-0.6.0
- old
+ new
@@ -2,12 +2,12 @@
module Isolator # :nodoc: all
class UnsafeOperationError < StandardError
MESSAGE = "You are trying to do unsafe operation inside db transaction"
- def initialize(msg = nil)
+ def initialize(msg = nil, details: nil)
msg ||= self.class::MESSAGE
- super
+ super(details ? "#{msg}\nDetails: #{details}" : msg)
end
end
class HTTPError < UnsafeOperationError
MESSAGE = "You are trying to make an outgoing network request inside db transaction. "