org.elite.jdcbot.framework
Class BotException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.elite.jdcbot.framework.BotException
All Implemented Interfaces:
java.io.Serializable

public class BotException
extends java.lang.Exception

An BotException class.

Since:
0.5
Version:
0.7
Author:
Kokanovic Branko, AppleGrew
See Also:
Serialized Form

Field Summary
static int A_DOWNLOAD_WAS_NOT_REQUESTED
           
static int BAD_PASSWORD
           
static int DOWNLOAD_NOT_POSSIBLE_BOTH_PASSIVE
           
private  int error_code
           
static int IO_ERROR
           
private  java.lang.String msg
           
static int NO_FREE_DOWNLOAD_SLOTS
           
static int NO_FREE_SLOTS
           
static int NOT_CONNECTED_TO_HUB
           
static int PROTOCOL_UNSUPPORTED
           
static int REMOTE_CLIENT_SENT_WRONG_USRNAME
           
private static long serialVersionUID
           
static int UNEXPECTED_RESPONSE
           
static int USRNAME_NOT_FOUND
           
static int VALIDATE_DENIED
           
 
Constructor Summary
BotException(int errorCode)
          Constructs a new BotException.
BotException(java.lang.String e, int errorCode)
           
 
Method Summary
private  java.lang.String code2msg(int errorCode)
           
 int getErrCode()
           
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

NO_FREE_SLOTS

public static final int NO_FREE_SLOTS
See Also:
Constant Field Values

REMOTE_CLIENT_SENT_WRONG_USRNAME

public static final int REMOTE_CLIENT_SENT_WRONG_USRNAME
See Also:
Constant Field Values

VALIDATE_DENIED

public static final int VALIDATE_DENIED
See Also:
Constant Field Values

BAD_PASSWORD

public static final int BAD_PASSWORD
See Also:
Constant Field Values

NOT_CONNECTED_TO_HUB

public static final int NOT_CONNECTED_TO_HUB
See Also:
Constant Field Values

USRNAME_NOT_FOUND

public static final int USRNAME_NOT_FOUND
See Also:
Constant Field Values

UNEXPECTED_RESPONSE

public static final int UNEXPECTED_RESPONSE
See Also:
Constant Field Values

PROTOCOL_UNSUPPORTED

public static final int PROTOCOL_UNSUPPORTED
See Also:
Constant Field Values

A_DOWNLOAD_WAS_NOT_REQUESTED

public static final int A_DOWNLOAD_WAS_NOT_REQUESTED
See Also:
Constant Field Values

NO_FREE_DOWNLOAD_SLOTS

public static final int NO_FREE_DOWNLOAD_SLOTS
See Also:
Constant Field Values

DOWNLOAD_NOT_POSSIBLE_BOTH_PASSIVE

public static final int DOWNLOAD_NOT_POSSIBLE_BOTH_PASSIVE
See Also:
Constant Field Values

IO_ERROR

public static final int IO_ERROR
See Also:
Constant Field Values

error_code

private int error_code

msg

private java.lang.String msg
Constructor Detail

BotException

public BotException(int errorCode)
Constructs a new BotException.

Parameters:
e - The error message to report.

BotException

public BotException(java.lang.String e,
                    int errorCode)
Method Detail

code2msg

private java.lang.String code2msg(int errorCode)

getErrCode

public int getErrCode()

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable