1 package org.oddjob.arooa; 2 3 6 public class ArooaException extends RuntimeException { 7 8 9 private Location location = Location.UNKNOWN_LOCATION; 10 11 public ArooaException() { 12 } 13 14 public ArooaException(String message) { 15 super(message); 16 } 17 18 public ArooaException(String message, Throwable t) { 19 super(message, t); 20 } 21 22 public ArooaException(Throwable t) { 23 super(t); 24 } 25 26 public Throwable getException() { 27 return getCause(); 28 } 29 30 39 public ArooaException(Throwable cause, Location location) { 40 this(cause); 41 this.location = location; 42 } 43 44 55 public ArooaException(String msg, Throwable cause, Location location) { 56 this(msg, cause); 57 this.location = location; 58 } 59 60 61 66 public String toString() { 67 return location.toString() + getMessage(); 68 } 69 70 76 public void setLocation(Location location) { 77 this.location = location; 78 } 79 80 85 public Location getLocation() { 86 return location; 87 } 88 89 } 90 | Popular Tags |