1 18 package org.apache.batik.script; 19 20 26 public class InterpreterException extends Exception { 27 private int line = -1; private int column = -1; private Exception embedded = null; 31 37 public InterpreterException(String message, int lineno, int columnno) { 38 super(message); 39 line = lineno; 40 column = columnno; 41 } 42 43 50 public InterpreterException(Exception exception, 51 String message, int lineno, int columnno) { 52 this(message, lineno, columnno); 53 embedded = exception; 54 } 55 56 60 public int getLineNumber() { 61 return line; 62 } 63 64 68 public int getColumnNumber() { 69 return column; 70 } 71 72 76 public Exception getException() { 77 return embedded; 78 } 79 80 85 public String getMessage() { 86 String msg = super.getMessage(); 87 if (msg != null) { 88 return msg; 89 } else if (embedded != null) { 90 return embedded.getMessage(); 91 } else { 92 return null; 93 } 94 } 95 } 96 | Popular Tags |