Package org.apache.uima.ducc.common.jd.plugin

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

Related Classes of org.apache.uima.ducc.common.jd.plugin.IJdProcessExceptionHandler

Copyright © 2018 www.massapicom. 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.