1 18 package org.apache.batik.css.parser; 19 20 32 public class ParseException extends RuntimeException { 33 34 37 protected Exception exception; 38 39 42 protected int lineNumber; 43 44 47 protected int columnNumber; 48 49 55 public ParseException (String message, int line, int column) { 56 super(message); 57 exception = null; 58 lineNumber = line; 59 columnNumber = column; 60 } 61 62 70 public ParseException (Exception e) { 71 exception = e; 72 lineNumber = -1; 73 columnNumber = -1; 74 } 75 76 84 public ParseException (String message, Exception e) { 85 super(message); 86 this.exception = e; 87 } 88 89 97 public String getMessage () { 98 String message = super.getMessage(); 99 100 if (message == null && exception != null) { 101 return exception.getMessage(); 102 } else { 103 return message; 104 } 105 } 106 107 111 public Exception getException () { 112 return exception; 113 } 114 115 118 public int getLineNumber() { 119 return lineNumber; 120 } 121 122 125 public int getColumnNumber() { 126 return columnNumber; 127 } 128 } 129 | Popular Tags |