Class: AiravataSystemException

Inherits:
Thrift::Exception
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/airavata_errors_types.rb

Overview

This exception is thrown by Airavata Services when a call fails as a result of a problem in the service that could not be changed through client’s action.

airavataErrorType: The message type indicating the error that occurred.

must be one of the values of AiravataErrorType.

message: This may contain additional information about the error

Constant Summary collapse

AIRAVATAERRORTYPE =
1
MESSAGE =
2
FIELDS =
{
  AIRAVATAERRORTYPE => {:type => ::Thrift::Types::I32, :name => 'airavataErrorType', :enum_class => ::AiravataErrorType},
  MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



306
# File 'lib/airavata_errors_types.rb', line 306

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


308
309
310
311
312
313
# File 'lib/airavata_errors_types.rb', line 308

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field airavataErrorType is unset!') unless @airavataErrorType
  unless @airavataErrorType.nil? || ::AiravataErrorType::VALID_VALUES.include?(@airavataErrorType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field airavataErrorType!')
  end
end