Example usage for org.springframework.beans.factory.xml XmlBeanDefinitionStoreException getCause

List of usage examples for org.springframework.beans.factory.xml XmlBeanDefinitionStoreException getCause

Introduction

In this page you can find the example usage for org.springframework.beans.factory.xml XmlBeanDefinitionStoreException getCause.

Prototype

public synchronized Throwable getCause() 

Source Link

Document

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Usage

From source file:com.predic8.membrane.core.config.spring.TrackingFileSystemXmlApplicationContext.java

public static void handleXmlBeanDefinitionStoreException(XmlBeanDefinitionStoreException e)
        throws InvalidConfigurationException {
    Throwable cause = e.getCause();
    if (cause != null) {
        if (cause instanceof SAXParseException) {
            int line = ((SAXParseException) cause).getLineNumber();

            throw new InvalidConfigurationException("line " + line + ": " + cause.getMessage());
        }//w  w  w . j  a va2s .c o  m
    }
    throw e;
}