Sha256: 01f0d59a47eae64e8facdccc16b83b3ef83de4cef3867f53acf54eafaad72f4b

Contents?: true

Size: 620 Bytes

Versions: 3

Compression:

Stored size: 620 Bytes

Contents

require 'ae/core_ext'

# = Assertion
#
#   "The reserve of modern assertions is sometimes pushed to extremes,
#    in which the fear of being contradicted leads the writer to strip
#    himself of almost all sense and meaning."
#                              -- Sir Winston Churchill (1874 - 1965)
#
# This is the underlying Exception class of the whole system.
#
class Assertion < Exception

  #
  def initialize(message=nil, opts={})
    backtrace = opts[:backtrace]
    super(message)
    set_backtrace(backtrace) if backtrace
  end

  def to_s
    'fail ' + super
  end

end

# Copyright (c) 2008,2009 Thomas Sawyer

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ae-1.2 lib/ae/assertion.rb
ae-1.1.0 lib/ae/assertion.rb
ae-1.0.0 lib/ae/assertion.rb