Exception: Rubylog::RubylogError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rubylog/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ RubylogError

Returns a new instance of RubylogError.



4
5
6
7
8
# File 'lib/rubylog/errors.rb', line 4

def initialize *args
  super

  remove_internal_lines
end

Instance Method Details

#remove_internal_linesObject



10
11
12
13
14
15
# File 'lib/rubylog/errors.rb', line 10

def remove_internal_lines
  internal_dir = File.dirname(__FILE__) or return
  return unless backtrace
  index = backtrace.index{|l| not l.start_with?(internal_dir) } or return
  set_backtrace backtrace[index..-1]
end