Class: AuthorizationException
- Inherits:
-
Thrift::Exception
- Object
- Thrift::Exception
- AuthorizationException
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/airavata_errors_types.rb
Overview
This exception is thrown for invalid authorization requests such user does not have acces to an aplication or resource.
message: contains the authorization failure message
Constant Summary collapse
- MESSAGE =
1
- FIELDS =
{ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} }
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ AuthorizationException
constructor
A new instance of AuthorizationException.
- #struct_fields ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize(message = nil) ⇒ AuthorizationException
Returns a new instance of AuthorizationException.
148 149 150 151 |
# File 'lib/airavata_errors_types.rb', line 148 def initialize(=nil) super() self. = end |
Instance Method Details
#struct_fields ⇒ Object
159 |
# File 'lib/airavata_errors_types.rb', line 159 def struct_fields; FIELDS; end |
#validate ⇒ Object
161 162 163 |
# File 'lib/airavata_errors_types.rb', line 161 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field message is unset!') unless @message end |