Package org.fugerit.java.core.cfg
Class ConfigException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.fugerit.java.core.lang.ex.CodeException
-
- org.fugerit.java.core.cfg.ConfigException
-
- All Implemented Interfaces:
Serializable
public class ConfigException extends CodeException
Exception for handling unexpected situations during configuration.
Config exception is able to wrap a code.
- Author:
- Fugerit
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CODE
Default value for the code field in a ConfigException.
-
Constructor Summary
Constructors Constructor Description ConfigException()
ConfigException(int code)
ConfigException(String message)
ConfigException(String message, int code)
ConfigException(String message, Throwable cause)
ConfigException(String message, Throwable cause, int code)
ConfigException(Throwable cause)
ConfigException(Throwable cause, int code)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends Exception>
voidapply(UnsafeVoid<E> fun)
static ConfigException
convertEx(Exception e)
static ConfigException
convertEx(String baseMessage, Exception e)
static ConfigException
convertExMethod(String method, Exception e)
static <T,E extends Exception>
Tget(UnsafeSupplier<T,E> fun)
static ConfigException
stadardExceptionWrapping(Exception e)
-
Methods inherited from class org.fugerit.java.core.lang.ex.CodeException
getCode
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
DEFAULT_CODE
public static final int DEFAULT_CODE
Default value for the code field in a ConfigException.
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConfigException
public ConfigException()
-
ConfigException
public ConfigException(int code)
-
ConfigException
public ConfigException(String message, int code)
-
ConfigException
public ConfigException(String message)
-
ConfigException
public ConfigException(Throwable cause, int code)
-
ConfigException
public ConfigException(Throwable cause)
-
-
Method Detail
-
stadardExceptionWrapping
public static ConfigException stadardExceptionWrapping(Exception e) throws ConfigException
- Throws:
ConfigException
-
convertEx
public static ConfigException convertEx(String baseMessage, Exception e)
-
convertExMethod
public static ConfigException convertExMethod(String method, Exception e)
-
convertEx
public static ConfigException convertEx(Exception e)
-
get
public static <T,E extends Exception> T get(UnsafeSupplier<T,E> fun) throws ConfigException
- Throws:
ConfigException
-
apply
public static <E extends Exception> void apply(UnsafeVoid<E> fun) throws ConfigException
- Throws:
ConfigException
-
-