1 19 package org.netbeans.tax; 20 21 25 public class InvalidArgumentException extends TreeException { 26 27 28 private static final long serialVersionUID =3768694309653946597L; 29 30 31 private Object argument; 32 33 34 38 42 public InvalidArgumentException (Object arg, String msg) { 43 super (msg == null ? "" : msg); 45 argument = arg; 46 } 47 48 50 public InvalidArgumentException (String msg, Exception exc) { 51 super (msg, exc); 52 53 argument = null; 54 } 55 56 58 public InvalidArgumentException (Exception exc) { 59 super (exc); 60 61 argument = null; 62 } 63 64 65 69 71 public final Object getArgument () { 72 return argument; 73 } 74 75 78 public final String getMessage () { 79 String detail = ""; if (argument != null) { 81 detail = " " + Util.THIS.getString ("PROP_violating_argument", argument); 82 } 83 84 return super.getMessage () + detail; 85 } 86 87 } 88 | Popular Tags |