Exception: MediaTypes::UnexpectedValidationResultError
- Inherits:
-
StandardError
- Object
- StandardError
- MediaTypes::UnexpectedValidationResultError
- Defined in:
- lib/media_types/scheme.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#fixture_caller ⇒ Object
Returns the value of attribute fixture_caller.
Instance Method Summary collapse
-
#initialize(fixture_caller, error) ⇒ UnexpectedValidationResultError
constructor
A new instance of UnexpectedValidationResultError.
- #message ⇒ Object
Constructor Details
#initialize(fixture_caller, error) ⇒ UnexpectedValidationResultError
Returns a new instance of UnexpectedValidationResultError.
36 37 38 39 |
# File 'lib/media_types/scheme.rb', line 36 def initialize(fixture_caller, error) self.fixture_caller = fixture_caller self.error = error end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
50 51 52 |
# File 'lib/media_types/scheme.rb', line 50 def error @error end |
#fixture_caller ⇒ Object
Returns the value of attribute fixture_caller.
50 51 52 |
# File 'lib/media_types/scheme.rb', line 50 def fixture_caller @fixture_caller end |
Instance Method Details
#message ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/media_types/scheme.rb', line 41 def format( '%<caller_path>s:%<caller_line>s -> %<error>s', caller_path: fixture_caller.path, caller_line: fixture_caller.lineno, error: error.is_a?(MediaTypes::Scheme::ValidationError) ? "#{error.class}:#{error.}" : error ) end |