Method: YARD::Logger#backtrace

Defined in:
lib/yard/logging.rb

#backtrace(exc) ⇒ void

This method returns an undefined value.

Prints the backtrace exc to the logger as error data.

Parameters:

[View source]

35
36
37
38
39
40
# File 'lib/yard/logging.rb', line 35

def backtrace(exc)
  return unless show_backtraces
  error "#{exc.class.class_name}: #{exc.message}"
  error "Stack trace:" +
    exc.backtrace[0..5].map {|x| "\n\t#{x}" }.join + "\n"
end