Exception: THTP::ServerError

Inherits:
Error
  • Object
show all
Defined in:
lib/thtp/errors.rb

Overview

parent class for all errors during RPC execution; serializable as a Thrift::ApplicationException

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.typeThrift::ApplicationExceptionType

Returns:



11
12
13
# File 'lib/thtp/errors.rb', line 11

def self.type
  Thrift::ApplicationException::UNKNOWN
end

Instance Method Details

#to_thriftThrift::ApplicationException

Returns a serialisable Thrift exception.

Returns:

  • a serialisable Thrift exception



16
17
18
# File 'lib/thtp/errors.rb', line 16

def to_thrift
  Thrift::ApplicationException.new(self.class.type, message)
end