Exception: Canon::ValidationError
- Defined in:
- lib/canon/errors.rb
Overview
Error raised when input validation fails
This error is raised when input (XML, HTML, JSON, YAML) is malformed or fails validation checks. It includes detailed information about the error location and nature.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(message, format:, line: nil, column: nil, details: nil) ⇒ ValidationError
constructor
Initialize a new ValidationError.
Constructor Details
#initialize(message, format:, line: nil, column: nil, details: nil) ⇒ ValidationError
Initialize a new ValidationError
34 35 36 37 38 39 40 |
# File 'lib/canon/errors.rb', line 34 def initialize(, format:, line: nil, column: nil, details: nil) @format = format @line = line @column = column @details = details super(()) end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
24 25 26 |
# File 'lib/canon/errors.rb', line 24 def column @column end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
24 25 26 |
# File 'lib/canon/errors.rb', line 24 def details @details end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
24 25 26 |
# File 'lib/canon/errors.rb', line 24 def format @format end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
24 25 26 |
# File 'lib/canon/errors.rb', line 24 def line @line end |