Method: Mongo::Utils.excerpt_backtrace
- Defined in:
- lib/mongo/utils.rb
.excerpt_backtrace(exc, **opts) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/mongo/utils.rb', line 50 module_function def excerpt_backtrace(exc, **opts) case lines = opts[:bg_error_backtrace] when Integer ":\n#{exc.backtrace[0..lines].join("\n")}" when false, nil nil else ":\n#{exc.backtrace.join("\n")}" end end |