Exception: Exception

Defined in:
lib/ae/core_ext/helpers.rb,
lib/ae/core_ext/exception.rb

Direct Known Subclasses

AE::Assertion

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.raised?Boolean

:yeild:


188
189
190
191
192
193
194
195
# File 'lib/ae/core_ext/helpers.rb', line 188

def self.raised? #:yeild:
  begin
    yield
    false
  rescue self
    true
  end
end

Instance Method Details

#assertion?Boolean

Is this exception the result of an assertion?


3
4
5
# File 'lib/ae/core_ext/exception.rb', line 3

def assertion?
  @assertion || false
end

#negative?Boolean


14
15
16
# File 'lib/ae/core_ext/exception.rb', line 14

def negative?
  @negative || false
end

#set_assertion(boolean) ⇒ Object

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


9
10
11
# File 'lib/ae/core_ext/exception.rb', line 9

def set_assertion(boolean)
  @assertion = !!boolean
end

#set_negative(boolean) ⇒ Object


19
20
21
# File 'lib/ae/core_ext/exception.rb', line 19

def set_negative(boolean)
  @negative = !!boolean
end