Spring Framework

org.springframework.beans.factory.xml
Class XmlBeanDefinitionStoreException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.beans.BeansException
                      extended by org.springframework.beans.FatalBeanException
                          extended by org.springframework.beans.factory.BeanDefinitionStoreException
                              extended by org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
All Implemented Interfaces:
java.io.Serializable

public class XmlBeanDefinitionStoreException
extends BeanDefinitionStoreException

XML-specific BeanDefinitionStoreException subclass that wraps a SAXException, typically a SAXParseException which contains information about the error location.

Since:
2.0.2
Author:
Juergen Hoeller
See Also:
getLineNumber(), SAXParseException, Serialized Form

Constructor Summary
XmlBeanDefinitionStoreException(java.lang.String resourceDescription, java.lang.String msg, org.xml.sax.SAXException cause)
          Create a new XmlBeanDefinitionStoreException.
 
Method Summary
 int getLineNumber()
          Return the line number in the XML resource that failed.
 
Methods inherited from class org.springframework.beans.factory.BeanDefinitionStoreException
getBeanName, getResourceDescription
 
Methods inherited from class org.springframework.beans.BeansException
equals, hashCode
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlBeanDefinitionStoreException

public XmlBeanDefinitionStoreException(java.lang.String resourceDescription,
                                       java.lang.String msg,
                                       org.xml.sax.SAXException cause)
Create a new XmlBeanDefinitionStoreException.

Parameters:
resourceDescription - description of the resource that the bean definition came from
msg - the detail message (used as exception message as-is)
cause - the SAXException (typically a SAXParseException) root cause
See Also:
SAXParseException
Method Detail

getLineNumber

public int getLineNumber()
Return the line number in the XML resource that failed.

Returns:
the line number if available (in case of a SAXParseException); -1 else
See Also:
SAXParseException.getLineNumber()

Spring Framework