Révision 3037
tmp/org.txm.core/src/java/org/txm/xml/XMLProcessor.java (revision 3037) | ||
---|---|---|
227 | 227 |
} |
228 | 228 |
} |
229 | 229 |
catch (Exception e) { |
230 |
System.out.println("Error while parsing file " + inputurl); |
|
231 |
System.out.println("Location " + parser.getLocation()); |
|
230 |
System.out.println("Location " + getLocation()); |
|
232 | 231 |
org.txm.utils.logger.Log.printStackTrace(e); |
233 | 232 |
after(false); |
234 | 233 |
return false; |
tmp/org.txm.core/src/java/org/txm/xml/XMLParser.java (revision 3037) | ||
---|---|---|
195 | 195 |
} |
196 | 196 |
} |
197 | 197 |
catch (Exception e) { |
198 |
System.out.println("Unexpected error while parsing file " + inputurl + " : " + e); |
|
199 |
System.out.println("Location line: " + parser.getLocation().getLineNumber() + " character: " + parser.getLocation().getColumnNumber()); |
|
198 |
System.out.println("Unexpected error while parsing at " + getLocation() + " : " + e); |
|
200 | 199 |
org.txm.utils.logger.Log.printStackTrace(e); |
201 | 200 |
// e.printStackTrace(); |
202 | 201 |
after(false); // if you need to do something before closing the parser(); |
... | ... | |
213 | 212 |
switch (event) { |
214 | 213 |
case XMLStreamConstants.START_DOCUMENT: |
215 | 214 |
processStartDocument(); |
216 |
break; |
|
215 |
break;
|
|
217 | 216 |
case XMLStreamConstants.SPACE: |
218 | 217 |
processSpace(); |
219 |
break; |
|
218 |
break;
|
|
220 | 219 |
case XMLStreamConstants.NOTATION_DECLARATION: |
221 | 220 |
processNotationDeclaration(); |
222 |
break; |
|
221 |
break;
|
|
223 | 222 |
case XMLStreamConstants.NAMESPACE: |
224 | 223 |
processNamespace(); |
225 | 224 |
break; |
... | ... | |
255 | 254 |
|
256 | 255 |
public final String getLocation() { |
257 | 256 |
if (parser != null) { |
258 |
return "Line: " + parser.getLocation().getLineNumber() + " Col: " + parser.getLocation().getColumnNumber(); |
|
257 |
return "Line: " + parser.getLocation().getLineNumber() + " Col: " + parser.getLocation().getColumnNumber() + " of " + inputurl;
|
|
259 | 258 |
} |
260 | 259 |
return null; |
261 | 260 |
} |
Formats disponibles : Unified diff