Examples of ErrorHandler


Examples of org.geoserver.util.ErrorHandler

        File f = new File("../web/src/main/webapp/schemas/wfs/1.1.0/wfs.xsd" );
        if ( !f.exists() ) {
            return;
        }
       
        ErrorHandler handler = new ErrorHandler(logger, Level.WARNING);
        // use the schema embedded in the web module
        ReaderUtils.validate(reader, handler, WFS.NAMESPACE,
                "../web/src/main/webapp/schemas/wfs/1.1.0/wfs.xsd");

        assertTrue(handler.errors.isEmpty());
View Full Code Here

Examples of org.hibernate.search.exception.ErrorHandler

    return new EntityKeyMetadata( persister.getTableName(), persister.getRootTableIdentifierColumnNames() );
  }

  @Override
  public void run() {
    ErrorHandler errorHandler = searchFactory.getErrorHandler();
    try {
      final EntityKeyMetadata keyMetadata = getEntityKeyMetadata();
      final SessionAwareRunnable consumer = new TupleIndexer( indexedType, monitor, sessionFactory, searchFactory, cacheMode, batchBackend, errorHandler );
      gridDialect.forEachTuple( new OptionallyWrapInJTATransaction( sessionFactory, errorHandler, consumer ), keyMetadata );
    }
    catch ( RuntimeException re ) {
      // being this an async thread we want to make sure everything is somehow reported
      errorHandler.handleException( log.massIndexerUnexpectedErrorMessage(), re );
    }
    finally {
      endAllSignal.countDown();
    }
  }
View Full Code Here

Examples of org.jboss.aerogear.controller.router.decorators.ErrorHandler

            final EndpointInvoker endpointInvoker = mockInvoker.getEndpointInvoker();
            final RouteProcessor defaultRouteProcessor = new DefaultRouteProcessor(consumers, endpointInvoker);
            final RouteProcessor paginationHandler = new PaginationHandler(defaultRouteProcessor, pagingInstance, consumers,
                    endpointInvoker);
            final RouteProcessor securityHandler = new SecurityHandler(paginationHandler, securityProviderInstance);
            final RouteProcessor errorHandler = new ErrorHandler(securityHandler, endpointInvoker);
            routeProcessor = new ResponseHandler(errorHandler, mockResponders.getResponders());
            return routeProcessor;
        } else {
            return routeProcessor;
        }
View Full Code Here

Examples of org.jclouds.azure.management.xml.ErrorHandler

   public void test() {
      InputStream is = getClass().getResourceAsStream("/error.xml");

      Error expected = expected();

      ErrorHandler handler = injector.getInstance(ErrorHandler.class);
      Error result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());

   }
View Full Code Here

Examples of org.jets3t.service.impl.rest.CloudFrontXmlResponsesSaxParser.ErrorHandler

                            throw new CloudFrontServiceException("Encountered too many CloudFront Internal Server errors ("
                                + internalErrorCount + "), aborting request.");                           
                        }
                    } else {
                        // Parse XML error message.
                        ErrorHandler handler = (new CloudFrontXmlResponsesSaxParser())
                            .parseErrorResponse(httpMethod.getResponseBodyAsStream());
                           
                        CloudFrontServiceException exception = new CloudFrontServiceException(
                            "Request failed with CloudFront Service error",
                            responseCode, handler.getType(), handler.getCode(),
                            handler.getMessage(), handler.getDetail(),
                            handler.getRequestId());
                       
                        if ("RequestExpired".equals(exception.getErrorCode())) {
                            // Retry on time skew errors.
                            this.timeOffset = RestUtils.getAWSTimeAdjustment();
                            if (log.isWarnEnabled()) {
View Full Code Here

Examples of org.jwildfire.swing.ErrorHandler

    label.setValue(value);
  }

  protected void selectEnvelope() {
    Envelope editEnvelope = envelope.clone();
    EnvelopeDialog dlg = new EnvelopeDialog(SwingUtilities.getWindowAncestor(editor), new ErrorHandler() {

      @Override
      public void handleError(Throwable pThrowable) {
        pThrowable.printStackTrace();
View Full Code Here

Examples of org.marc4j.ErrorHandler

      
        InputStream inNorm;
        InputStream inPerm;
        OutputStream patchedRecStream = null;
        MarcWriter patchedRecs = null;
        ErrorHandler errorHandler = new ErrorHandler();
        try
        {
            inNorm = new FileInputStream(file);
            readerNormal = new MarcPermissiveStreamReader(inNorm, false, to_utf_8);
            inPerm = new FileInputStream(file);
            readerPermissive = new MarcPermissiveStreamReader(inPerm, errorHandler, to_utf_8, "BESTGUESS");
        }
        catch (FileNotFoundException e)
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        if (args.length > 1)
        {
            try
            {
                patchedRecStream = new FileOutputStream(new File(args[1]));
                patchedRecs = new MarcStreamWriter(patchedRecStream);
            }
            catch (FileNotFoundException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        while (readerNormal.hasNext() && readerPermissive.hasNext())
        {
            Record recNorm;
            Record recPerm;
            recPerm = readerPermissive.next();
            String strPerm = recPerm.toString();
            try {
                recNorm = readerNormal.next();
            }
            catch (MarcException me)
            {
                if (verbose)
                {
                    out.println("Fatal Exception: "+ me.getMessage());
                    dumpErrors(out, errorHandler);
                    showDiffs(out, null, strPerm);
                    out.println("-------------------------------------------------------------------------------------");
                }
                continue;
            }
            String strNorm = recNorm.toString();
            if (!strNorm.equals(strPerm))
            {
                if (verbose)
                {
                    dumpErrors(out, errorHandler);
                    showDiffs(out, strNorm, strPerm);
                    out.println("-------------------------------------------------------------------------------------");
                   
                }
                if (patchedRecs != null)
                {
                    patchedRecs.write(recPerm);
                }
            }
            else if (errorHandler.hasErrors())
            {
                if (verbose)
                {
                    out.println("Results identical, but errors reported");
                    dumpErrors(out, errorHandler);
View Full Code Here

Examples of org.mojavemvc.exception.ErrorHandler

       
        AppProperties properties = mock(AppProperties.class);
        when(properties.getProperty(DefaultJSPErrorHandler.JSP_ERROR_FILE))
            .thenReturn(errorJsp);

        ErrorHandler errorHandler = new DefaultJSPErrorHandler();
        View view = errorHandler.handleError(null, properties);

        assertTrue(view instanceof JSP);
        JSP jspView = (JSP) view;
        assertEquals(errorJsp, jspView.getJSPName());
    }
View Full Code Here

Examples of org.mojavemvc.exception.ErrorHandler

    @Test
    public void createErrorHandler() throws Exception {

        DefaultJSPErrorHandlerFactory factory = new DefaultJSPErrorHandlerFactory();
        ErrorHandler errorHandler = factory.createErrorHandler();

        assertTrue(errorHandler instanceof DefaultJSPErrorHandler);
    }
View Full Code Here

Examples of org.mojavemvc.exception.ErrorHandler

*/
public class HTMLErrorHandlerFactory implements ErrorHandlerFactory {

    @Override
    public ErrorHandler createErrorHandler() {
        return new ErrorHandler() {
            @Override
            public View handleError(Throwable e, AppProperties properties) {
                return new HTMLErrorPage();
            }
        };
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.