Package org.apache.tomcat.jni
Class Error
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.tomcat.jni.Error
-
- All Implemented Interfaces:
java.io.Serializable
public class Error extends java.lang.Exception
Error- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
description
A description of the problem.private int
error
APR error type.private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
Error(int error, java.lang.String description)
Construct an APRException.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Get the APR description of the exception.int
getError()
Get the APR error code of the exception.static int
netosError()
Get the last platform socket error.static int
osError()
Get the last platform error.static java.lang.String
strerror(int statcode)
Return a human readable string describing the specified error.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
error
private final int error
APR error type.
-
description
private final java.lang.String description
A description of the problem.
-
-
Method Detail
-
getError
public int getError()
Get the APR error code of the exception.- Returns:
- error of the Exception
-
getDescription
public java.lang.String getDescription()
Get the APR description of the exception.- Returns:
- description of the Exception
-
osError
public static int osError()
Get the last platform error.- Returns:
- apr_status_t the last platform error, folded into apr_status_t, on most platforms This retrieves errno, or calls a GetLastError() style function, and folds it with APR_FROM_OS_ERROR. Some platforms (such as OS2) have no such mechanism, so this call may be unsupported. Do NOT use this call for socket errors from socket, send, recv etc!
-
netosError
public static int netosError()
Get the last platform socket error.- Returns:
- the last socket error, folded into apr_status_t, on all platforms This retrieves errno or calls a GetLastSocketError() style function, and folds it with APR_FROM_OS_ERROR.
-
strerror
public static java.lang.String strerror(int statcode)
Return a human readable string describing the specified error.- Parameters:
statcode
- The error code the get a string for.- Returns:
- The error string.
-
-