com.empireclassic.Remote
Class EmpireError

java.lang.Object
  extended by com.empireclassic.Remote.EmpireError

public class EmpireError
extends java.lang.Object

This class provides an abstraction of an error response from the server. In most cases the error string will be a human readable error generated by the server.

Author:
chas
See Also:
errorString

Field Summary
 int errorNum
          The error number from the server
 java.lang.String errorString
          The error string returned by the server
 
Constructor Summary
EmpireError()
           
EmpireError(int errorNum, java.lang.String errorString)
          Construct an EmpireError from an error number and string
EmpireError(java.lang.String response)
          Parse a response string from the server and make an EmpireError out of it.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorNum

public int errorNum
The error number from the server


errorString

public java.lang.String errorString
The error string returned by the server

Constructor Detail

EmpireError

public EmpireError()

EmpireError

public EmpireError(int errorNum,
                   java.lang.String errorString)
Construct an EmpireError from an error number and string

Parameters:
errorNum - An error code
errorString - An error description

EmpireError

public EmpireError(java.lang.String response)
Parse a response string from the server and make an EmpireError out of it. Assumes this is actually an error response, so that line 1 has an error code and line 2 is the error message.

Parameters:
response - The multi-line response from the server