Exception: Evernote::EDAM::Error::EDAMSystemException
- Inherits:
-
Thrift::Exception
- Object
- StandardError
- Thrift::Exception
- Evernote::EDAM::Error::EDAMSystemException
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/Evernote/EDAM/errors_types.rb
Overview
This exception is thrown by EDAM procedures when a call fails as a result of an a problem in the service that could not be changed through user action.
errorCode: The numeric code indicating the type of error that occurred.
must be one of the values of EDAMErrorCode.
message: This may contain additional information about the error
Constant Summary collapse
- ERRORCODE =
1
- MESSAGE =
2
- FIELDS =
{ ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :enum_class => Evernote::EDAM::Error::EDAMErrorCode}, MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message', :optional => true} }
Constants included from Thrift::Struct_Union
Thrift::Struct_Union::CONTAINER_TYPES
Instance Attribute Summary
Attributes inherited from Thrift::Exception
Instance Method Summary collapse
Methods included from Thrift::Struct
#<=>, #==, #differences, #eql?, field_accessor, #fields_with_default_values, generate_accessors, #hash, #initialize, #inspect, qmark_isset_method, #read, #write
Methods included from Thrift::Struct_Union
#each_field, #field_info, #inspect_collection, #inspect_field, #is_container?, #name_to_id, #read_field, #sorted_field_ids, #write_container, #write_data
Methods inherited from Thrift::Exception
Instance Method Details
#struct_fields ⇒ Object
87 |
# File 'lib/Evernote/EDAM/errors_types.rb', line 87 def struct_fields; FIELDS; end |
#validate ⇒ Object
89 90 91 92 93 94 |
# File 'lib/Evernote/EDAM/errors_types.rb', line 89 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field errorCode is unset!') unless @errorCode unless @errorCode.nil? || Evernote::EDAM::Error::EDAMErrorCode::VALID_VALUES.include?(@errorCode) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field errorCode!') end end |