1 16 17 package org.springframework.beans.factory.xml; 18 19 import org.xml.sax.SAXException ; 20 import org.xml.sax.SAXParseException ; 21 22 import org.springframework.beans.factory.BeanDefinitionStoreException; 23 24 34 public class XmlBeanDefinitionStoreException extends BeanDefinitionStoreException { 35 36 43 public XmlBeanDefinitionStoreException(String resourceDescription, String msg, SAXException cause) { 44 super(resourceDescription, msg, cause); 45 } 46 47 52 public int getLineNumber() { 53 Throwable cause = getCause(); 54 if (cause instanceof SAXParseException ) { 55 return ((SAXParseException ) cause).getLineNumber(); 56 } 57 return -1; 58 } 59 60 } 61 | Popular Tags |