1 package javax.xml.stream; 2 3 11 public class XMLStreamException extends Exception { 12 13 protected Throwable nested; 14 protected Location location; 15 16 19 public XMLStreamException(){ 20 super(); 21 } 22 23 28 public XMLStreamException(String msg) { 29 super(msg); 30 } 31 32 37 public XMLStreamException(Throwable th) { 38 super(th); 39 nested = th; 40 } 41 42 48 public XMLStreamException(String msg, Throwable th) { 49 super(msg, th); 50 nested = th; 51 } 52 53 60 public XMLStreamException(String msg, Location location, Throwable th) { 61 super("ParseError at [row,col]:["+location.getLineNumber()+","+ 62 location.getColumnNumber()+"]\n"+ 63 "Message: "+msg); 64 nested = th; 65 this.location = location; 66 } 67 68 74 public XMLStreamException(String msg, 75 Location location) { 76 super("ParseError at [row,col]:["+location.getLineNumber()+","+ 77 location.getColumnNumber()+"]\n"+ 78 "Message: "+msg); 79 this.location = location; 80 } 81 82 83 88 public Throwable getNestedException() { 89 return nested; 90 } 91 92 97 public Location getLocation() { 98 return location; 99 } 100 101 } 102 103 104 105 106 107 108 | Popular Tags |