|
JAFS API v2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--org.openafs.jafs.AFSException
An exception indicating that an error has occurred in the Java AFS API, in the Java AFS JNI, or in the AFS file system.
Exception
,
Serialized FormField Summary | |
protected int |
errno
The AFS specific error number (code). |
Fields inherited from class java.lang.Exception |
|
Constructor Summary | |
AFSException(int errno)
Constructs an AFSException with the specified error code.
|
|
AFSException(String reason)
Constructs an AFSException with the specified detail
message. |
|
AFSException(String reason,
int errno)
Constructs an AFSException with the specified detail message
and specified error code. |
Method Summary | |
String |
getAFSMessage()
Returns the AFS error message string defined by the ErrorTable
class. |
String |
getAFSMessage(Locale locale)
Returns the AFS error message defined by the ErrorTable
class. |
int |
getErrorCode()
Returns the AFS specific error number (code). |
String |
getMessage()
Returns the error message string of this exception. |
String |
getMessage(Locale locale)
Returns the locale specific error message string of this exception. |
String |
toString()
Returns a string representation of this AFS Exception. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int errno
getErrorCode()
Constructor Detail |
public AFSException(String reason)
AFSException
with the specified detail
message.
reason
- the detail message.public AFSException(int errno)
AFSException
with the specified error code.
This constructor will also generate the appropriate error message
respective to the specified error code.
errno
- the AFS error number (error code).public AFSException(String reason, int errno)
AFSException
with the specified detail message
and specified error code. In this constructor the specified detail message
overrides the default AFS error message defined by the
ErrorTable
class. Therefore, to retrieve the AFS specific
error message, you must use the getAFSMessage()
method.
The getMessage()
method will return the message specified
in this constructor.
reason
- the detail message.errno
- the AFS error number (error code).Method Detail |
public int getErrorCode()
ErrorTable
class method
ErrorTable.getMessage(int)
.
AFSException
object.ErrorTable.getMessage(int)
public String getMessage()
getMessage
in class Throwable
getAFSMessage()
public String getMessage(Locale locale)
locale
- the locale for which this message will be displayed
getAFSMessage()
public String getAFSMessage()
ErrorTable
class. The message will be formatted according to the default
Locale.
This message is also available from this object's super class
method getMessage
. However, this method will always return
the string message associated with the actual AFS error code/number
specified, whereas the getMessage()
method will return the
string message intended for this Exception object, which may be
an overridden message defined in the constructor of this Exception.
getAFSMessage(Locale)
,
AFSException(String, int)
,
ErrorTable.getMessage(int)
,
Throwable.getMessage()
public String getAFSMessage(Locale locale)
ErrorTable
class. The message will be formatted according to the specified Locale.
This message is also available from this object's super class
method getMessage
. However, this method will always return
the string message associated with the actual AFS error code/number
specified, whereas the getMessage()
method will return the
string message intended for this Exception object, which may be
an overridden message defined in the constructor of this Exception.
locale
- the locale for which this message will be displayed
getAFSMessage()
,
AFSException(String, int)
,
ErrorTable.getMessage(int, Locale)
,
Throwable.getMessage()
public String toString()
The message will be formatted according to the specified Locale.
toString
in class Throwable
getAFSMessage()
,
ErrorTable.getMessage(int)
,
Throwable.getMessage()
|
JAFS API v2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |