Exception: Respect::ValidationError

Inherits:
RespectError
  • Object
show all
Defined in:
lib/respect.rb

Overview

Raised when the validation process has failed.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ValidationError) initialize(message)

A new instance of ValidationError



100
101
102
103
# File 'lib/respect.rb', line 100

def initialize(message)
  super
  @context = [ message ]
end

Instance Attribute Details

- (Object) context (readonly)

An array of error messages to help you track where the error happened. Use it as a back-trace but in your validated object instead of your code.



108
109
110
# File 'lib/respect.rb', line 108

def context
  @context
end