Class: DuplicateEntryException
- Inherits:
-
Thrift::Exception
- Object
- Thrift::Exception
- DuplicateEntryException
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/airavata_errors_types.rb
Overview
This exception is thrown when you try to save a duplicate entity that already exists
in the database.
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) ⇒ DuplicateEntryException
constructor
A new instance of DuplicateEntryException.
- #struct_fields ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize(message = nil) ⇒ DuplicateEntryException
Returns a new instance of DuplicateEntryException.
175 176 177 178 |
# File 'lib/airavata_errors_types.rb', line 175 def initialize(=nil) super() self. = end |
Instance Method Details
#struct_fields ⇒ Object
186 |
# File 'lib/airavata_errors_types.rb', line 186 def struct_fields; FIELDS; end |
#validate ⇒ Object
188 189 190 |
# File 'lib/airavata_errors_types.rb', line 188 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field message is unset!') unless @message end |