public class BeanCreationException extends FatalBeanException
| Constructor and Description |
|---|
BeanCreationException(String msg)
Create a new BeanCreationException.
|
BeanCreationException(String beanName,
String msg)
Create a new BeanCreationException.
|
BeanCreationException(String resourceDescription,
String beanName,
String msg)
Create a new BeanCreationException.
|
BeanCreationException(String resourceDescription,
String beanName,
String msg,
Throwable cause)
Create a new BeanCreationException.
|
BeanCreationException(String beanName,
String msg,
Throwable cause)
Create a new BeanCreationException.
|
BeanCreationException(String msg,
Throwable cause)
Create a new BeanCreationException.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRelatedCause(Throwable ex)
Add a related cause to this bean creation exception,
not being a direct cause of the failure but having occurred
earlier in the creation of the same bean instance.
|
boolean |
contains(Class<?> exClass) |
String |
getBeanName()
Return the name of the bean requested, if any.
|
Throwable[] |
getRelatedCauses()
Return the related causes, if any.
|
String |
getResourceDescription()
Return the description of the resource that the bean
definition came from, if any.
|
void |
printStackTrace(PrintStream ps) |
void |
printStackTrace(PrintWriter pw) |
String |
toString() |
getMessage, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTracepublic BeanCreationException(String msg)
msg - the detail messagepublic BeanCreationException(String msg, Throwable cause)
msg - the detail messagecause - the root causepublic BeanCreationException(String beanName, String msg)
beanName - the name of the bean requestedmsg - the detail messagepublic BeanCreationException(String beanName, String msg, Throwable cause)
beanName - the name of the bean requestedmsg - the detail messagecause - the root causepublic BeanCreationException(@Nullable
String resourceDescription,
@Nullable
String beanName,
String msg)
resourceDescription - description of the resource
that the bean definition came frombeanName - the name of the bean requestedmsg - the detail messagepublic BeanCreationException(@Nullable
String resourceDescription,
String beanName,
String msg,
Throwable cause)
resourceDescription - description of the resource
that the bean definition came frombeanName - the name of the bean requestedmsg - the detail messagecause - the root cause@Nullable public String getResourceDescription()
@Nullable public String getBeanName()
public void addRelatedCause(Throwable ex)
ex - the related cause to add@Nullable public Throwable[] getRelatedCauses()
null if nonepublic void printStackTrace(PrintStream ps)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter pw)
printStackTrace in class Throwablepublic boolean contains(@Nullable
Class<?> exClass)
contains in class org.springframework.core.NestedRuntimeException