1 16 package org.apache.commons.chain.impl; 17 18 19 import org.apache.commons.chain.Chain; 20 import org.apache.commons.chain.Command; 21 import org.apache.commons.chain.Context; 22 23 24 31 public class ExceptionCommand extends NonDelegatingCommand { 32 33 34 36 37 public ExceptionCommand() { 38 this(""); 39 } 40 41 42 public ExceptionCommand(String id) { 44 super(id); 45 } 46 47 48 50 51 public void execute(Context context, Chain chain) throws Exception { 53 54 super.execute(context); 55 throw new ArithmeticException (this.id); 56 57 } 58 59 60 } 61 | Popular Tags |