1 25 26 package com.sslexplorer.boot; 27 28 29 37 public class XMLParseException 38 extends RuntimeException 39 { 40 41 44 public static final int NO_LINE = -1; 45 46 47 55 private int lineNr; 56 57 58 72 public XMLParseException(String name, 73 String message) 74 { 75 super("XML Parse Exception during parsing of " 76 + ((name == null) ? "the XML definition" 77 : ("a " + name + " element")) 78 + ": " + message); 79 this.lineNr = XMLParseException.NO_LINE; 80 } 81 82 83 99 public XMLParseException(String name, 100 int lineNr, 101 String message) 102 { 103 super("XML Parse Exception during parsing of " 104 + ((name == null) ? "the XML definition" 105 : ("a " + name + " element")) 106 + " at line " + lineNr + ": " + message); 107 this.lineNr = lineNr; 108 } 109 110 111 118 public int getLineNr() 119 { 120 return this.lineNr; 121 } 122 123 } 124 | Popular Tags |