public class NativeLibException extends Exception
Modifier and Type | Field and Description |
---|---|
private ArrayList |
args
Additional arguments.
|
private int |
libErr
Internal error as number.
|
private String |
libErrString
Internal error message; contains most the symbolic error name.
|
private static HashMap |
messageResourceBundles
Map of founded resource bundles which contains the localized error messages.
|
private int |
osErr
OS error as number.
|
private String |
osErrString
OS error string; if possible localized.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
NativeLibException()
The constructor.
|
NativeLibException(int libErr,
int osErr,
String libString,
String osString)
Creates a NativeLibException with the given values.
|
NativeLibException(String message)
Creates a NativeLibException with the given message.
|
NativeLibException(String message,
Throwable cause)
Creates a NativeLibException with the given message and cause.
|
NativeLibException(Throwable cause)
Creates a NativeLibException with the given cause.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(String arg)
Adds a string to the internal argument list.
|
static void |
addResourceBundle(String bundlePath)
Adds a resource bundle which contains localized error messages.
|
ArrayList |
getArguments()
Returns the internal argument list.
|
int |
getLibErr()
Returns the number of the internal handled error.
|
String |
getLibMessage()
Returns the message of the internal handled error.
|
String |
getLocalizedLibMessage()
Returns the localized message of the internal handled error.
|
String |
getMessage() |
private String |
getMsg(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.
|
String |
getOsMessage()
Returns the message of the system error.
|
private static String |
replaceString(String destination,
String what,
String with)
Returns a string resulting from replacing all occurrences of what in this string with with.
|
String |
reviseMsgWithArgs(String msg) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
private static final long serialVersionUID
private static final HashMap messageResourceBundles
private int libErr
private int osErr
private String libErrString
private String osErrString
public NativeLibException()
public NativeLibException(String message)
message
- to be usedpublic NativeLibException(Throwable cause)
cause
- to be usedpublic NativeLibException(String message, Throwable cause)
message
- message to be usedcause
- cause to be usedpublic NativeLibException(int libErr, int osErr, String libString, String osString)
libErr
- identifier of the internal handled errorosErr
- system error numberlibString
- message for the internal handled errorosString
- system error messagepublic static void addResourceBundle(String bundlePath)
bundlePath
- path of bundle without localepublic String getMessage()
getMessage
in class Throwable
public int getLibErr()
public String getLibMessage()
public String getLocalizedLibMessage()
public int getOsErr()
public String getOsMessage()
public void addArgument(String arg)
arg
- string to be added to the internal argument listpublic ArrayList getArguments()
public String reviseMsgWithArgs(String msg)
private String getMsg(String s)
s
- string which should be used as keys for the resource bundleprivate static String replaceString(String destination, String what, String with)
destination
- string for which the replacing should be performedwhat
- what string should be replacedwith
- with what string what should be replacedWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses