class Exception

Public Class Methods

raised?() { || ... } click to toggle source
# File lib/ae/core_ext/helpers.rb, line 188
def self.raised? #:yeild:
  begin
    yield
    false
  rescue self
    true
  end
end

Public Instance Methods

assertion?() click to toggle source

Is this exception the result of an assertion?

# File lib/ae/core_ext/exception.rb, line 3
def assertion?
  @assertion || false
end
negative?() click to toggle source
# File lib/ae/core_ext/exception.rb, line 14
def negative?
  @negative || false
end
set_assertion(boolean) click to toggle source

Set true/false if the this exception is an assertion.

# File lib/ae/core_ext/exception.rb, line 9
def set_assertion(boolean)
  @assertion = !!boolean
end
set_negative(boolean) click to toggle source
# File lib/ae/core_ext/exception.rb, line 19
def set_negative(boolean)
  @negative = !!boolean
end