Exception: Ooor::ValidationError
- Inherits:
-
OpenERPServerError
- Object
- RuntimeError
- OpenERPServerError
- Ooor::ValidationError
- Defined in:
- lib/ooor/errors.rb
Instance Attribute Summary
Attributes inherited from OpenERPServerError
#faultCode, #faultString, #request
Instance Method Summary collapse
Methods inherited from OpenERPServerError
build, create_from_trace, #filter_password, #initialize, #to_s
Constructor Details
This class inherits a constructor from Ooor::OpenERPServerError
Instance Method Details
#extract_error_line!(errors, line) ⇒ Object
93 94 95 96 97 |
# File 'lib/ooor/errors.rb', line 93 def extract_error_line!(errors, line) fields = line.split(": ")[0].split(' ').last.split(',') msg = line.split(": ")[1] fields.each { |field| errors.add(field.strip.to_sym, msg) } end |
#extract_validation_error!(errors) ⇒ Object
87 88 89 90 91 |
# File 'lib/ooor/errors.rb', line 87 def extract_validation_error!(errors) @faultCode.split("\n").each do |line| extract_error_line!(errors, line) if line.index(': ') end end |