Class: Roby::GUI::ExceptionRendering
- Inherits:
-
MetaRuby::GUI::ExceptionRendering
- Object
- MetaRuby::GUI::ExceptionRendering
- Roby::GUI::ExceptionRendering
- Defined in:
- lib/roby/gui/exception_view.rb
Instance Attribute Summary collapse
-
#excluded_patterns ⇒ Object
readonly
Returns the value of attribute excluded_patterns.
Instance Method Summary collapse
- #add_excluded_pattern(rx) ⇒ Object
- #each_exception_from(e, &block) ⇒ Object
- #filter_backtrace(parsed_backtrace, raw_backtrace) ⇒ Object
-
#initialize ⇒ ExceptionRendering
constructor
A new instance of ExceptionRendering.
- #user_file?(file) ⇒ Boolean
Constructor Details
#initialize ⇒ ExceptionRendering
Returns a new instance of ExceptionRendering.
8 9 10 11 |
# File 'lib/roby/gui/exception_view.rb', line 8 def initialize(*) super @excluded_patterns = Regexp.new("^$") end |
Instance Attribute Details
#excluded_patterns ⇒ Object (readonly)
Returns the value of attribute excluded_patterns.
6 7 8 |
# File 'lib/roby/gui/exception_view.rb', line 6 def excluded_patterns @excluded_patterns end |
Instance Method Details
#add_excluded_pattern(rx) ⇒ Object
13 14 15 |
# File 'lib/roby/gui/exception_view.rb', line 13 def add_excluded_pattern(rx) @excluded_patterns = Regexp.union(excluded_patterns, rx) end |
#each_exception_from(e, &block) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/roby/gui/exception_view.rb', line 17 def each_exception_from(e, &block) super do |e| yield e if e.respond_to?(:original_exceptions) e.original_exceptions.each do |original_e| each_exception_from(original_e, &block) end end end end |
#filter_backtrace(parsed_backtrace, raw_backtrace) ⇒ Object
28 29 30 31 32 |
# File 'lib/roby/gui/exception_view.rb', line 28 def filter_backtrace(parsed_backtrace, raw_backtrace) raw_backtrace = raw_backtrace .find_all { |l| !(excluded_patterns === l) } Roby.filter_backtrace(raw_backtrace, force: true) end |