1 7 package com.inversoft.verge.mvc.controller.test; 8 9 10 import com.inversoft.verge.mvc.controller.Action; 11 import com.inversoft.verge.mvc.controller.ActionHandlerException; 12 13 14 21 public class TestActionHandler { 22 23 public boolean simple = false; 24 public boolean exception = false; 25 public final TestActionHandler2 handler2 = new TestActionHandler2(); 26 27 28 31 public TestActionHandler() { 32 } 33 34 35 38 public void handleTestSimple(Action event) { 39 System.out.println("Inside handleTestSimple"); 40 simple = true; 41 } 42 43 46 public void handleTestException(Action event) throws ActionHandlerException { 47 System.out.println("Inside handleTestException"); 48 exception = true; 49 throw new ActionHandlerException("test"); 50 } 51 52 55 public TestActionHandler2 getProperty() { 56 return handler2; 57 } 58 59 62 public void handleException(Action event) throws Exception { 63 System.out.println("Inside handleException"); 64 throw new Exception ("test"); 65 } 66 67 70 public void handleRuntimeException(Action event) throws RuntimeException { 71 System.out.println("Inside handleRuntimeException"); 72 throw new RuntimeException ("test"); 73 } 74 75 78 public void handleError(Action event) throws Error { 79 System.out.println("Inside handleError"); 80 exception = true; 81 throw new Error ("test"); 82 } 83 84 87 public void handleThrowable(Action event) throws Throwable { 88 System.out.println("Inside handleThrowable"); 89 exception = true; 90 throw new Throwable ("test"); 91 } 92 } | Popular Tags |