Examples of ErrorHandler


Examples of org.auto.comet.ErrorHandler

  private Map<Serializable, Socket> socketMapping = new HashMap<Serializable, Socket>();

  @Override
  public boolean accept(Socket pushSocket, HttpServletRequest request) {
    String userId = request.getParameter("userId");
    pushSocket.setErrorHandler(new ErrorHandler() {

      @Override
      public void error(Socket socket, PushException e) {
        // TODO Auto-generated method stub
View Full Code Here

Examples of org.codehaus.janino.UnitCompiler.ErrorHandler

                            problems.add(problem);
                        }
                    })
                );

        compiler.setCompileErrorHandler(new ErrorHandler() {
            public void handleError( final String pMessage, final Location pLocation ) throws CompileException {
                final CompilationProblem problem = new JaninoCompilationProblem(pLocation.getFileName(), pLocation, pMessage, true);
                if (problemHandler != null) {
                    problemHandler.handle(problem);
                }
View Full Code Here

Examples of org.crank.annotations.ErrorHandler

    Class targetClass = targetMethod.getDeclaringClass();
    ErrorHandlers errorHandlers = (ErrorHandlers) targetClass.getAnnotation(ErrorHandlers.class);
    addToList(errorHandlers, errorHandlerList);

    /* See if there is a single error handler present at the class level if so add it to the list. */
    ErrorHandler errorHandler = (ErrorHandler) targetClass.getAnnotation(ErrorHandler.class);
    addToList(errorHandlerList, errorHandler);
   
    /* Find the annotation. */
    errorHandlers = AnnotationUtils.findAnnotation(targetMethod, ErrorHandlers.class);
    addToList(errorHandlers, errorHandlerList);
View Full Code Here

Examples of org.drools.compiler.PackageBuilder.ErrorHandler

        //this will sort out the errors based on what class/file they happened in
        if ( result.getErrors().length > 0 ) {
            for ( int i = 0; i < result.getErrors().length; i++ ) {
                final CompilationProblem err = result.getErrors()[i];
                final ErrorHandler handler = this.errorHandlers.get( err.getFileName() );
                handler.addError( err );
            }

            final Collection errors = this.errorHandlers.values();
            for (Object error : errors) {
                final ErrorHandler handler = (ErrorHandler) error;
                if (handler.isInError()) {
                    this.results.add(handler.getError());
                }
            }
        }

        // We've compiled everthing, so clear it for the next set of additions
View Full Code Here

Examples of org.drools.compiler.builder.impl.errors.ErrorHandler

        //this will sort out the errors based on what class/file they happened in
        if ( result.getErrors().length > 0 ) {
            for ( int i = 0; i < result.getErrors().length; i++ ) {
                final CompilationProblem err = result.getErrors()[i];
                final ErrorHandler handler = this.errorHandlers.get( err.getFileName() );
                handler.addError( err );
            }

            final Collection errors = this.errorHandlers.values();
            for (Object error : errors) {
                final ErrorHandler handler = (ErrorHandler) error;
                if (handler.isInError()) {
                    this.results.add(handler.getError());
                }
            }
        }

        // We've compiled everthing, so clear it for the next set of additions
View Full Code Here

Examples of org.drools.compiler.compiler.PackageBuilder.ErrorHandler

        //this will sort out the errors based on what class/file they happened in
        if ( result.getErrors().length > 0 ) {
            for ( int i = 0; i < result.getErrors().length; i++ ) {
                final CompilationProblem err = result.getErrors()[i];
                final ErrorHandler handler = this.errorHandlers.get( err.getFileName() );
                handler.addError( err );
            }

            final Collection errors = this.errorHandlers.values();
            for (Object error : errors) {
                final ErrorHandler handler = (ErrorHandler) error;
                if (handler.isInError()) {
                    this.results.add(handler.getError());
                }
            }
        }

        // We've compiled everthing, so clear it for the next set of additions
View Full Code Here

Examples of org.eclipse.aether.impl.DefaultServiceLocator.ErrorHandler

    DefaultServiceLocator locator = MavenRepositorySystemUtils.newServiceLocator();
    locator.addService(ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class);
    locator.addService(RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class);
    locator.addService(TransporterFactory.class, FileTransporterFactory.class);
    locator.addService(TransporterFactory.class, HttpTransporterFactory.class);
    locator.setErrorHandler(new ErrorHandler() {
      @Override
      public void serviceCreationFailed(Class<?> type, Class<?> impl, Throwable exception) {
        if (reporter != null)
          reporter.error("Service creation failed for type %s using impl %s: %s", type, impl, exception.getLocalizedMessage());
        exception.printStackTrace();
View Full Code Here

Examples of org.eclipse.jetty.server.handler.ErrorHandler

      context.addServlet(sh,
          "/" + UGateWebSocketServlet.class.getSimpleName());
      final ServletHolder sh2 = new ServletHolder(
          UGateAjaxUpdaterServlet.class);
      context.addServlet(sh2, "/*");
      context.setErrorHandler(new ErrorHandler() {
        @Override
        public void handle(String target, Request baseRequest,
            HttpServletRequest request, HttpServletResponse response)
            throws IOException {
          // delegate errors to the filter
View Full Code Here

Examples of org.fao.geonet.utils.Xml.ErrorHandler

     * @return
     * @throws Exception
     */
    private synchronized Element getXSDXmlReport(String schema, Element md) {
        // NOTE: this method assumes that enumerateTree has NOT been run on the metadata
        ErrorHandler errorHandler = new ErrorHandler();
        errorHandler.setNs(Edit.NAMESPACE);
        Element xsdErrors;

        try {
            xsdErrors = validateInfo(schema,
                    md, errorHandler);
View Full Code Here

Examples of org.fluentd.logger.errorhandler.ErrorHandler

        });
        threadManager.submit(fluentd1);

        // start a logger
        final FluentLogger logger = FluentLogger.getLogger("testtag", host, port);
        final ErrorHandler errorHandler = new ErrorHandler() {
            @Override
            public void handleNetworkError(IOException ex) {
                lastError.set(ex);
            }
        };
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.