public class InjectionException extends RuntimeException
An exception class for reporting exceptions related to dependency injection.
When working with reflection naturally a whole bunch of exceptions can be
thrown. This library wraps these exceptions in a generic
InjectionException
. Note that this is a runtime exception, so
there is no need for explicit catch blocks. (If dependency injection causes
exceptions, this is typically due to a wrong configuration; so there is
nothing the application itself can do about.)
Constructor and Description |
---|
InjectionException()
Creates a new instance of
InjectionException |
InjectionException(String msg)
Creates a new instance of
InjectionException and
initializes it with an error message. |
InjectionException(String msg,
Throwable cause)
Creates a new instance of
InjectionException and
initializes it with both an error message and a root cause. |
InjectionException(Throwable cause)
Creates a new instance of
InjectionException and
initializes it with a root cause. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InjectionException()
InjectionException
public InjectionException(String msg)
InjectionException
and
initializes it with an error message.msg
- the error messagepublic InjectionException(Throwable cause)
InjectionException
and
initializes it with a root cause.cause
- the root cause of this exceptionCopyright © 2016 The JGUIraffe Team. All rights reserved.