Class: ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatException Private
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatException
- Defined in:
- lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #args ⇒ Object readonly private
- #block ⇒ Object readonly private
- #exception ⇒ Object readonly private
- #kwargs ⇒ Object readonly private
- #max_backtrace_size ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ String private
- #initialize(exception:, args:, kwargs:, block:, max_backtrace_size: Constants::DEFAULT_MAX_BACKTRACE_SIZE) ⇒ void constructor private
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(exception:, args:, kwargs:, block:, max_backtrace_size: Constants::DEFAULT_MAX_BACKTRACE_SIZE) ⇒ void
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.
52 53 54 55 56 57 58 |
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb', line 52 def initialize(exception:, args:, kwargs:, block:, max_backtrace_size: Constants::DEFAULT_MAX_BACKTRACE_SIZE) @exception = exception @args = args @kwargs = kwargs @block = block @max_backtrace_size = max_backtrace_size end |
Instance Attribute Details
#args ⇒ Object (readonly)
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.
30 31 32 |
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb', line 30 def args @args end |
#block ⇒ Object (readonly)
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.
42 43 44 |
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb', line 42 def block @block end |
#exception ⇒ Object (readonly)
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.
18 19 20 |
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb', line 18 def exception @exception end |
#kwargs ⇒ Object (readonly)
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.
36 37 38 |
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb', line 36 def kwargs @kwargs end |
#max_backtrace_size ⇒ Object (readonly)
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.
24 25 26 |
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb', line 24 def max_backtrace_size @max_backtrace_size end |
Instance Method Details
#call ⇒ String
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.
Exceptions formatting is inspired by RSpec. It has almost the same output (at least for RSpec 3).
138 139 140 141 142 143 144 145 |
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_exception.rb', line 138 def call <<~MESSAGE.rstrip #{formatted_exception_class} #{} #{formatted_exception_backtrace} #{formatted_exception_cause} MESSAGE end |