public class NativeLibException
extends java.lang.Exception
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList |
args
Additional arguments.
|
private int |
libErr
Internal error as number.
|
private java.lang.String |
libErrString
Internal error message; contains most the symbolic error name.
|
private static java.util.HashMap |
messageResourceBundles
Map of founded resource bundles which contains the localized error messages.
|
private int |
osErr
OS error as number.
|
private java.lang.String |
osErrString
OS error string; if possible localized.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
NativeLibException()
The constructor.
|
NativeLibException(int libErr,
int osErr,
java.lang.String libString,
java.lang.String osString)
Creates a NativeLibException with the given values.
|
NativeLibException(java.lang.String message)
Creates a NativeLibException with the given message.
|
NativeLibException(java.lang.String message,
java.lang.Throwable cause)
Creates a NativeLibException with the given message and cause.
|
NativeLibException(java.lang.Throwable cause)
Creates a NativeLibException with the given cause.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(java.lang.String arg)
Adds a string to the internal argument list.
|
static void |
addResourceBundle(java.lang.String bundlePath)
Adds a resource bundle which contains localized error messages.
|
java.util.ArrayList |
getArguments()
Returns the internal argument list.
|
int |
getLibErr()
Returns the number of the internal handled error.
|
java.lang.String |
getLibMessage()
Returns the message of the internal handled error.
|
java.lang.String |
getLocalizedLibMessage()
Returns the localized message of the internal handled error.
|
java.lang.String |
getMessage() |
private java.lang.String |
getMsg(java.lang.String s)
Searches the resource bundles for a string which coresponds to the given string as key.
|
int |
getOsErr()
Returns the number of the system error.
|
java.lang.String |
getOsMessage()
Returns the message of the system error.
|
private static java.lang.String |
replaceString(java.lang.String destination,
java.lang.String what,
java.lang.String with)
Returns a string resulting from replacing all occurrences of what in this string with with.
|
java.lang.String |
reviseMsgWithArgs(java.lang.String msg) |
private static final long serialVersionUID
private static final java.util.HashMap messageResourceBundles
private int libErr
private int osErr
private java.lang.String libErrString
private java.lang.String osErrString
private java.util.ArrayList args
public NativeLibException()
public NativeLibException(java.lang.String message)
message
- to be usedpublic NativeLibException(java.lang.Throwable cause)
cause
- to be usedpublic NativeLibException(java.lang.String message, java.lang.Throwable cause)
message
- message to be usedcause
- cause to be usedpublic NativeLibException(int libErr, int osErr, java.lang.String libString, java.lang.String osString)
libErr
- identifier of the internal handled errorosErr
- system error numberlibString
- message for the internal handled errorosString
- system error messagepublic static void addResourceBundle(java.lang.String bundlePath)
bundlePath
- path of bundle without localepublic java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public int getLibErr()
public java.lang.String getLibMessage()
public java.lang.String getLocalizedLibMessage()
public int getOsErr()
public java.lang.String getOsMessage()
public void addArgument(java.lang.String arg)
arg
- string to be added to the internal argument listpublic java.util.ArrayList getArguments()
public java.lang.String reviseMsgWithArgs(java.lang.String msg)
private java.lang.String getMsg(java.lang.String s)
s
- string which should be used as keys for the resource bundleprivate static java.lang.String replaceString(java.lang.String destination, java.lang.String what, java.lang.String with)
destination
- string for which the replacing should be performedwhat
- what string should be replacedwith
- with what string what should be replaced