Class: Iora::Models::Error

Inherits:
Element
  • Object
show all
Defined in:
lib/iora/models/error.rb

Overview

The Error class represents an element, an element used by the Wolfram Alpha API to provide detail when an error of some sort occurs.

This might occur when, for example, the input parameters are not legal in some way, the App ID is incorrect, or an internal error occurs in Wolfram Alpha.

Wolfram Alpha might also fail to process an individual pod, even if the query as a whole succeeds. In such cases, the Pod object would have an Error object that describes the error condition.

Instance Attribute Summary

Attributes inherited from Element

#element

Instance Method Summary collapse

Methods inherited from Element

#initialize, #to_xml

Methods included from Associations::HasOne

#has_one

Methods included from Associations::Helpers

#parse_element, #tag_for

Methods included from Associations::HasMany

#has_many

Methods included from Associations::HasAttribute

#has_attribute

Constructor Details

This class inherits a constructor from Iora::Models::Element

Instance Method Details

#codeInteger

Returns the error code.

Returns:

  • (Integer)

    the error code


23
# File 'lib/iora/models/error.rb', line 23

has_one :code, Integer

#messageString

Returns a short message describing the error.

Returns:

  • (String)

    a short message describing the error.


19
# File 'lib/iora/models/error.rb', line 19

has_one :message, String, tag: 'msg'