Class Evernote::EDAM::Error::EDAMUserException
In: ruby/lib/Evernote/EDAM/errors_types.rb
Parent: ::Thrift::Exception

This exception is thrown by EDAM procedures when a call fails as a result of a problem that a user may be able to resolve. For example, if the user attempts to add a note to their account which would exceed their storage quota, this type of exception may be thrown to indicate the source of the error so that they can choose an alternate action.

This exception would not be used for internal system errors that do not reflect user actions, but rather reflect a problem within the service that the user cannot resolve.

errorCode: The numeric code indicating the type of error that occurred.

  must be one of the values of EDAMErrorCode.

parameter: If the error applied to a particular input parameter, this will

  indicate which parameter.

Methods

Included Modules

::Thrift::Struct ::Thrift::Struct_Union

Constants

ERRORCODE = 1
PARAMETER = 2
FIELDS = { ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :enum_class => Evernote::EDAM::Error::EDAMErrorCode}, PARAMETER => {:type => ::Thrift::Types::STRING, :name => 'parameter', :optional => true}

Public Instance methods

[Source]

    # File ruby/lib/Evernote/EDAM/errors_types.rb, line 53
53:               def struct_fields; FIELDS; end

[Source]

    # File ruby/lib/Evernote/EDAM/errors_types.rb, line 55
55:               def validate
56:                 raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field errorCode is unset!') unless @errorCode
57:                 unless @errorCode.nil? || Evernote::EDAM::Error::EDAMErrorCode::VALID_VALUES.include?(@errorCode)
58:                   raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field errorCode!')
59:                 end
60:               end

[Validate]