|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.coi.tools.os.win.NativeLibException
public class NativeLibException
A exception class which will be used from the native part of system dependent classes to signal exceptions. The native methods writes only symbolic error messages, the language dependant mapping will be done in this class.
Field Summary | |
---|---|
private java.util.ArrayList<java.lang.String> |
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<java.lang.String,java.util.ResourceBundle> |
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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<java.lang.String> |
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)
Revise placeholder in the given message with the setted arguments |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private static final java.util.HashMap<java.lang.String,java.util.ResourceBundle> messageResourceBundles
private int libErr
private int osErr
private java.lang.String libErrString
private java.lang.String osErrString
private java.util.ArrayList<java.lang.String> args
Constructor Detail |
---|
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 messageMethod Detail |
---|
public 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<java.lang.String> getArguments()
public java.lang.String reviseMsgWithArgs(java.lang.String msg)
msg
- message to be revised
private java.lang.String getMsg(java.lang.String s)
s
- string which should be used as keys for the resource bundle
private 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |