Class: InvalidRequestException
- Inherits:
-
Thrift::Exception
- Object
- Thrift::Exception
- InvalidRequestException
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/airavata_errors_types.rb
Overview
This exception is thrown for invalid requests that occur from any reasons like required input parameters are missing,
or a parameter is malformed.
message: contains the associated error message.
Constant Summary collapse
- MESSAGE =
1
- FIELDS =
{ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} }
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ InvalidRequestException
constructor
A new instance of InvalidRequestException.
- #struct_fields ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize(message = nil) ⇒ InvalidRequestException
Returns a new instance of InvalidRequestException.
82 83 84 85 |
# File 'lib/airavata_errors_types.rb', line 82 def initialize(=nil) super() self. = end |
Instance Method Details
#struct_fields ⇒ Object
93 |
# File 'lib/airavata_errors_types.rb', line 93 def struct_fields; FIELDS; end |
#validate ⇒ Object
95 96 97 |
# File 'lib/airavata_errors_types.rb', line 95 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field message is unset!') unless @message end |