Examples of IJdProcessExceptionHandler


Examples of org.apache.uima.ducc.common.jd.plugin.IJdProcessExceptionHandler

  }

  @Test
  public void test() {
    try {
      IJdProcessExceptionHandler jdProcessExceptionHandler = JdProcessExceptionHandlerLoader.load(JdProcessExceptionHandler.class.getName());
      CAS cas = null;
      Exception e = null;
      Properties p = null;
      jdProcessExceptionHandler.handle("test001",cas, e, p);
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
      fail("Exception");
    } catch (IllegalAccessException e) {
      e.printStackTrace();
      fail("Exception");
    } catch (InstantiationException e) {
      e.printStackTrace();
      fail("Exception");
    }
     
    try {
      IJdProcessExceptionHandler jdProcessExceptionHandler = JdProcessExceptionHandlerLoader.load("org.apache.uima.ducc.common.jd.plugin.example.ExampleJdProcessExceptionHandler");
      CAS cas = null;
      Exception e = null;
      Properties p = null;
      jdProcessExceptionHandler.handle("test002",cas, e, p);
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
      fail("Exception");
    } catch (IllegalAccessException e) {
      e.printStackTrace();
      fail("Exception");
    } catch (InstantiationException e) {
      e.printStackTrace();
      fail("Exception");
    }
   
    try {
      IJdProcessExceptionHandler jdProcessExceptionHandler = JdProcessExceptionHandlerLoader.load("org.apache.uima.ducc.common.jd.plugin.example.BadJdProcessExceptionHandler");
      CAS cas = null;
      Exception e = null;
      Properties p = null;
      jdProcessExceptionHandler.handle("test003",cas, e, p);
      fail("No Exception?");
    } catch (ClassNotFoundException e) {
      //Expected
    } catch (IllegalAccessException e) {
      e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.