1 /* 2 * Replica is published under the terms 3 * of the Apache Software License. 4 */ 5 package replica.command; 6 7 /*** 8 * Generic exception, extended for all exceptions from the commands package. 9 * 10 * <note>It models an unchecked exception so the users can to choose to catch or not.<note> 11 * 12 * @author Pedro Costa 13 * @author Helder Silva 14 * @since 17/Jan/2004 15 */ 16 public class CommandException extends RuntimeException { 17 18 private String actionId; 19 20 /*** 21 * 22 */ 23 public CommandException() { 24 super(); 25 } 26 27 /*** 28 * @param message 29 */ 30 public CommandException(String message) { 31 super(message); 32 } 33 34 /*** 35 * @param cause 36 */ 37 public CommandException(Throwable cause) { 38 super(cause); 39 } 40 41 /*** 42 * @param message 43 * @param cause 44 */ 45 public CommandException(String message, Throwable cause) { 46 super(message, cause); 47 } 48 49 /*** 50 * Used to set the source actionId mapped to a command. 51 * 52 * @param message a helper message to identify the problem. 53 * @param actionId the action id. 54 */ 55 public CommandException(String message, String actionId){ 56 this(message); 57 58 setActionId( actionId ); 59 } 60 61 /*** 62 * Used to set the source actionId mapped to a command. 63 * 64 * @param message a helper message to identify the problem. 65 * @param actionId the action id. 66 * @param cause 67 */ 68 public CommandException(String message, String actionId, Throwable cause){ 69 this(message, cause); 70 71 setActionId( actionId ); 72 } 73 74 /*** 75 * @return 76 */ 77 public String getActionId() { 78 return actionId; 79 } 80 81 /*** 82 * @param string 83 */ 84 public void setActionId(String string) { 85 actionId = string; 86 } 87 }

This page was automatically generated by Maven