class Exception

Reopens the scope of the standard Exception-class to extend it with helpful methods.

Constants

Pattern

The pattern to match against the backtrace log.

Public Instance Methods

line() click to toggle source

Retrieve the line on which the exception was raised from when raised inside a script.

@return Fixnum the line of the script the exception was raised on.

# File library/blur/enhancements.rb, line 13
def line
  backtrace[0].match(Pattern)[1].to_i + 1
end