public class GlobalConfig extends java.lang.Object implements ExceptionsHandling
PRINT_EXCEPTION_MESSAGE, PRINT_EXCEPTION_STACKTRACE, RETROW_ALL, RETROW_EXCEPTION, SKIP_EXCEPTION
Modifier and Type | Method and Description |
---|---|
short |
getExceptionsHandling()
Return the exceptions handling type.
|
static GlobalConfig |
getInstance()
Return the unique instance.
|
void |
handleLibraryError(java.lang.String message)
Handle an error message, depending on the value of the
getExceptionsHandling() . |
void |
handleLibraryException(java.lang.Throwable th)
Handle a library exception, depending on the value of the
getExceptionsHandling() . |
void |
handleParsingError(java.lang.String message)
Handle an error message, depending on the value of the
getExceptionsHandling() . |
void |
handleParsingException(java.lang.Throwable th)
Handle a parsing exception, depending on the value of the
getExceptionsHandling() . |
boolean |
isSwingAvailable()
Return true if swing is available.
|
void |
setExceptionsHandling(short exceptionsHandling)
Set the exceptions handling type.
|
public static GlobalConfig getInstance()
public void setExceptionsHandling(short exceptionsHandling)
exceptionsHandling
- the exceptions handling typepublic short getExceptionsHandling()
public boolean isSwingAvailable()
public void handleLibraryError(java.lang.String message) throws SVGLibraryException
getExceptionsHandling()
. An exception will
be throw only if the value for the exceptions handling is ExceptionsHandling.RETROW_EXCEPTION
.message
- the error messageSVGLibraryException
- the rethrown exceptionpublic void handleParsingError(java.lang.String message) throws SVGParsingException
getExceptionsHandling()
. An exception will
be throw only if the value for the exceptions handling is ExceptionsHandling.RETROW_EXCEPTION
.message
- the error messageSVGParsingException
- the rethrown exceptionpublic void handleLibraryException(java.lang.Throwable th) throws SVGLibraryException
getExceptionsHandling()
. An exception will
be throw only if the value for the exceptions handling is ExceptionsHandling.RETROW_EXCEPTION
.th
- the ThrowableSVGLibraryException
- the rethrown exceptionpublic void handleParsingException(java.lang.Throwable th) throws SVGParsingException
getExceptionsHandling()
. An exception will
be throw only if the value for the exceptions handling is ExceptionsHandling.RETROW_EXCEPTION
.th
- the ThrowableSVGParsingException
- the rethrown exceptionCopyright © 2021, 2022, 2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence