![]() |
SudokuFX
|
Utility enum for handling and analyzing exceptions. More...
Collaboration diagram for fr.softsf.sudokufx.common.exception.ExceptionTools:Public Member Functions | |
| SQLInvalidAuthorizationSpecException | findSQLInvalidAuthException (Throwable e) |
Searches recursively through the exception chain to find the first SQLInvalidAuthorizationSpecException, starting from the given Throwable. | |
| FolderCreationException | logAndInstantiateFolderCreation (String message) |
Logs an error and creates a FolderCreationException without a cause. | |
| FolderCreationException | logAndInstantiateFolderCreation (String message, Throwable cause) |
Logs an error and creates a FolderCreationException with an optional cause. | |
| IllegalArgumentException | logAndInstantiateIllegalArgument (String message) |
Logs the given message and returns an instance of IllegalArgumentException with it. | |
| LogbackConfigurationException | logAndInstantiateLogbackConfig (String message, Throwable cause) |
Logs an error and returns a LogbackConfigurationException. | |
| ResourceLoadException | logAndInstantiateResourceLoad (String message, Throwable cause) |
Logs an error and creates a ResourceLoadException for any resource (audio, image, etc.). | |
| void | logAndThrowIllegalArgumentIfBlank (String value, String message) |
Logs the given message and throws an IllegalArgumentException if the given string is null, empty, or blank (only whitespace). | |
Public Attributes | |
| INSTANCE | |
Static Private Attributes | |
| static final Logger | LOG = LoggerFactory.getLogger(ExceptionTools.class) |
Utility enum for handling and analyzing exceptions.
This enum provides methods to search for specific exception types within exception chains.
| SQLInvalidAuthorizationSpecException fr.softsf.sudokufx.common.exception.ExceptionTools.findSQLInvalidAuthException | ( | Throwable | e | ) |
Searches recursively through the exception chain to find the first SQLInvalidAuthorizationSpecException, starting from the given Throwable.
| e | the Throwable to inspect (may be null) |
null if not found | FolderCreationException fr.softsf.sudokufx.common.exception.ExceptionTools.logAndInstantiateFolderCreation | ( | String | message | ) |
Logs an error and creates a FolderCreationException without a cause.
| message | descriptive message of the failure; if null or blank, a default message is used |
FolderCreationException instance
Here is the call graph for this function:| FolderCreationException fr.softsf.sudokufx.common.exception.ExceptionTools.logAndInstantiateFolderCreation | ( | String | message, |
| Throwable | cause ) |
Logs an error and creates a FolderCreationException with an optional cause.
| message | descriptive message of the failure; if null or blank, a default message is used |
| cause | the underlying exception that triggered the failure; may be null |
FolderCreationException instance | IllegalArgumentException fr.softsf.sudokufx.common.exception.ExceptionTools.logAndInstantiateIllegalArgument | ( | String | message | ) |
Logs the given message and returns an instance of IllegalArgumentException with it.
| message | the error message |
| LogbackConfigurationException fr.softsf.sudokufx.common.exception.ExceptionTools.logAndInstantiateLogbackConfig | ( | String | message, |
| Throwable | cause ) |
Logs an error and returns a LogbackConfigurationException.
The exception is instantiated (not thrown) to allow flexible handling by the caller.
| message | descriptive message of the failure; may be null or blank |
| cause | the original exception that triggered the failure; may be null |
LogbackConfigurationException instance | ResourceLoadException fr.softsf.sudokufx.common.exception.ExceptionTools.logAndInstantiateResourceLoad | ( | String | message, |
| Throwable | cause ) |
Logs an error and creates a ResourceLoadException for any resource (audio, image, etc.).
Handles null or blank messages and a null cause safely.
| message | descriptive message of the failure; may be null or blank |
| cause | the original exception that triggered the failure; may be null |
ResourceLoadException instance | void fr.softsf.sudokufx.common.exception.ExceptionTools.logAndThrowIllegalArgumentIfBlank | ( | String | value, |
| String | message ) |
Logs the given message and throws an IllegalArgumentException if the given string is null, empty, or blank (only whitespace).
| value | the string to check |
| message | the error message |
| IllegalArgumentException | if the string is blank or null |
| fr.softsf.sudokufx.common.exception.ExceptionTools.INSTANCE |
|
staticprivate |