class Tkrzw::Status
Status
of operations.
Constants
- APPLICATION_ERROR
Generic error caused by the application logic.
- BROKEN_DATA_ERROR
Error that internal data are broken.
- CANCELED_ERROR
Error that the operation is canceled.
- DUPLICATION_ERROR
Error that a specific resource is duplicated.
- INFEASIBLE_ERROR
Error that the operation is infeasible.
- INVALID_ARGUMENT_ERROR
Error that a given argument is invalid.
- NETWORK_ERROR
Error caused by networking failure.
- NOT_FOUND_ERROR
Error that a specific resource is not found.
- NOT_IMPLEMENTED_ERROR
Error that the feature is not implemented.
- PERMISSION_ERROR
Error that the operation is not permitted.
- PRECONDITION_ERROR
Error that a precondition is not met.
- SUCCESS
Success.
- SYSTEM_ERROR
Generic error from underlying systems.
- UNKNOWN_ERROR
Generic error whose cause is unknown.
Public Class Methods
Gets the string name of a status code.
-
@param code The status code.
-
@return The name of the status code.
# File tkrzw.rb, line 219 def self.code_name(code) # (native code) end
Sets the code and the message.
-
@param code The status code. This can be omitted and then
SUCCESS
is set. -
@param message An arbitrary status message. This can be omitted and the an empty string is set.
# File tkrzw.rb, line 143 def initialize(code=SUCCESS, message="") # (native code) end
Public Instance Methods
Returns True if the other object doesn't have the same code.
-
@param rhs The object to compare. It can be a status or an integer.
-
@return False if they are the same, or True if they are not.
# File tkrzw.rb, line 212 def !=(rhs) # (native code) end
Returns True if the other object has the same code.
-
@param rhs The object to compare. It can be a status or an integer.
-
@return True if they are the same, or False if they are not.
# File tkrzw.rb, line 205 def ==(rhs) # (native code) end
Gets the status code.
-
@return The status code.
# File tkrzw.rb, line 162 def code() # (native code) end
Returns a string representation of the object.
-
@return The string representation of the object.
# File tkrzw.rb, line 198 def inspect() # (native code) end
Assigns the internal state from another status object only if the current state is success.
-
@param rhs The status object.
# File tkrzw.rb, line 156 def join(rht) # (native code) end
Gets the status message.
-
@return The status message.
# File tkrzw.rb, line 168 def message() # (native code) end
Returns true if the status is success.
-
@return True if the status is success, or False on failure.
# File tkrzw.rb, line 174 def ok?() # (native code) end
Raises an exception if the status is not success.
-
@raise
StatusException
An exception containing the status object.
# File tkrzw.rb, line 180 def or_die() # (native code) end
Sets the code and the message.
-
@param code The status code. This can be omitted and then
SUCCESS
is set. -
@param message An arbitrary status message. This can be omitted and the an empty string is set.
# File tkrzw.rb, line 150 def set(code=SUCCESS, message="") # (native code) end
Returns the status code.
-
@return The status code.
# File tkrzw.rb, line 192 def to_i() # (native code) end
Returns a string representation of the content.
-
@return The string representation of the content.
# File tkrzw.rb, line 186 def to_s() # (native code) end