Exception: IFormat::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/iformat/error.rb

Overview

Error class for rescuing from all IFormat errors

Direct Known Subclasses

ClientError, ServerError

Defined Under Namespace

Classes: AuthorizationError, BadSessionId, BadUsernameOrPassword, BadUsernameOrPasswordOrPasswordsDifferent, ClientError, HeaderError, InsertCoin, InternalError, ItemError, LogoError, NotAllLinesHaveLinks, OrderAlreadyExists, OrderClosedNoLinksGenerated, OrderDeletedFromSystem, OrderNotFound, OrderWaitingForLinks, ResultTooBig, ServerError, UnknownError

Constant Summary collapse

UNKNOWN_ERROR_STATUS =
0
INTERNAL_ERROR_STATUS =
-1
BAD_SESSION_ID_STATUS =
-101
BAD_USERNAME_OR_PASSWORD_STATUS =
-102
BAD_USERNAME_OR_PASSWORD_OR_PASSWORDS_DIFFERENT_STATUS =
-103
ORDER_ALREADY_EXISTS_STATUS =
-1001
HEADER_ERROR_STATUS =
-1002
ITEM_ERROR_STATUS =
-1003
LOGO_ERROR_STATUS =
-1004
RESULT_TOO_BIG_STATUS =
-1005
INSERT_COIN_STATUS =
-1006
-1012
ORDER_NOT_FOUND_STATUS =
-1013
ORDER_DELETED_FROM_SYSTEM_STATUS =
-1014
-1015
-1016

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status = UNKNOWN_ERROR_STATUS) ⇒ Error

Returns a new instance of Error.



24
25
26
27
# File 'lib/iformat/error.rb', line 24

def initialize(message, status = UNKNOWN_ERROR_STATUS)
  @status = status
  super(message)
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



22
23
24
# File 'lib/iformat/error.rb', line 22

def status
  @status
end