Java AFS Admin API v1.3

org.openafs.jafsadm
Class AFSAdminException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.openafs.jafsadm.AFSAdminException
All Implemented Interfaces:
Serializable

public class AFSAdminException
extends Exception

An exception indicating that an error has occured in the Java AFS Administrative API, in the Java AFS Administrative JNI, or in the AFS file system.

Version:
1.0, 6/29/01
See Also:
Serialized Form

Constructor Summary
AFSAdminException(int errno)
          Constructs a AFSAdminException with the specified error code.
AFSAdminException(String message)
          Constructs a AFSAdminException with the specified detail message.
AFSAdminException(String message, int errno)
          Constructs a AFSAdminException with the specified detail message and specified error code.
 
Method Summary
 int getErrorCode()
          Returns the AFS specific error code (number).
 String getMessage()
          Returns the error message string of this Exception.
 String toString()
          Returns a String representation of this AFS Exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AFSAdminException

public AFSAdminException(String message)
Constructs a AFSAdminException with the specified detail message.
Parameters:
message - the detail message.

AFSAdminException

public AFSAdminException(int errno)
Constructs a AFSAdminException with the specified error code.
Parameters:
errno - the AFS error code (error number).

AFSAdminException

public AFSAdminException(String message,
                         int errno)
Constructs a AFSAdminException with the specified detail message and specified error code.
Parameters:
message - the detail message.
errno - the AFS error code (error number).
Method Detail

getErrorCode

public int getErrorCode()
Returns the AFS specific error code (number). This code can be used for numeric conditional handling or for indexing in a message catalog.
Returns:
the AFS error code of this AFSAdminException object.

getMessage

public String getMessage()
Returns the error message string of this Exception. By default only the AFS error code (number) is returned returned by the system and used to construct this exception object, thus this method will render a simple string that reveals the AFS error code.

Example: "Message not available. Error code: 180484"

Overrides:
getMessage in class Throwable
Returns:
the error message string of this AFSAdminException object.
See Also:
getErrorCode()

toString

public String toString()
Returns a String representation of this AFS Exception.

The message will be formatted according to the specified Locale.

Overrides:
toString in class Throwable
Returns:
the AFS error message string of this AFSAdminException object.
See Also:
getMessage()

Java AFS Admin (jafsadm) API for OpenAFS

Copyright (c) 2001-2002 International Business Machines Corp.
All rights reserved.
See copyright statement.