Class: EacRubyBase0::ErrorPresenter
- Inherits:
-
Object
- Object
- EacRubyBase0::ErrorPresenter
- Defined in:
- lib/eac_ruby_base0/error_presenter.rb
Instance Method Summary collapse
- #full_backtrace_message ⇒ String
- #full_message ⇒ String
- #log_path ⇒ Pathname
- #message ⇒ String
- #self_full_message ⇒ String
- #show ⇒ void
- #show_log_file ⇒ void
- #show_message ⇒ void
Instance Method Details
#full_backtrace_message ⇒ String
9 10 11 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 9 def the_error.backtrace.map { |v| "#{v}\n" }.join end |
#full_message ⇒ String
14 15 16 17 18 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 14 def + the_error.cause.if_present('') do |e| "#{'-' * 16}\n#{self.class.new(e).}" end end |
#log_path ⇒ Pathname
26 27 28 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 26 def log_path @log_path ||= ::EacRubyUtils::Fs::Temp.file.to_pathname.tap { |e| e.write() } end |
#message ⇒ String
21 22 23 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 21 def "#{the_error.} (#{the_error.class})" end |
#self_full_message ⇒ String
31 32 33 34 35 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 31 def "Error class: #{the_error.class}\n" \ "Message: #{the_error.}\n" \ "Backtrace:\n" + the_error.backtrace.map { |v| "#{v}\n" }.join end |
#show ⇒ void
This method returns an undefined value.
38 39 40 41 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 38 def show show_log_file end |
#show_log_file ⇒ void
This method returns an undefined value.
49 50 51 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 49 def show_log_file infov 'Full log', log_path end |
#show_message ⇒ void
This method returns an undefined value.
44 45 46 |
# File 'lib/eac_ruby_base0/error_presenter.rb', line 44 def error end |