Examples of ExceptionHandler


Examples of org.apache.maven.exception.ExceptionHandler

    {
        MavenExecutionResult result = maven.execute( cliRequest.request );

        if ( result.hasExceptions() )
        {
            ExceptionHandler handler = new DefaultExceptionHandler();

            Map<String, String> references = new LinkedHashMap<String, String>();

            MavenProject project = null;

            for ( Throwable exception : result.getExceptions() )
            {
                ExceptionSummary summary = handler.handleException( exception );

                logSummary( summary, references, "", cliRequest.showErrors );

                if ( project == null && exception instanceof LifecycleExecutionException )
                {
View Full Code Here

Examples of org.apache.maven.exception.ExceptionHandler

    {
        MavenExecutionResult result = maven.execute( cliRequest.request );

        if ( result.hasExceptions() )
        {
            ExceptionHandler handler = new DefaultExceptionHandler();

            Map<String, String> references = new LinkedHashMap<String, String>();

            MavenProject project = null;

            for ( Throwable exception : result.getExceptions() )
            {
                ExceptionSummary summary = handler.handleException( exception );

                logSummary( summary, references, "", cliRequest.showErrors );

                if ( project == null && exception instanceof LifecycleExecutionException )
                {
View Full Code Here

Examples of org.apache.maven.exception.ExceptionHandler

        eventSpyDispatcher.close();

        if ( result.hasExceptions() )
        {
            ExceptionHandler handler = new DefaultExceptionHandler();

            Map<String, String> references = new LinkedHashMap<String, String>();

            MavenProject project = null;

            for ( Throwable exception : result.getExceptions() )
            {
                ExceptionSummary summary = handler.handleException( exception );

                logSummary( summary, references, "", cliRequest.showErrors );

                if ( project == null && exception instanceof LifecycleExecutionException )
                {
View Full Code Here

Examples of org.apache.maven.exception.ExceptionHandler

        eventSpyDispatcher.close();

        if ( result.hasExceptions() )
        {
            ExceptionHandler handler = new DefaultExceptionHandler();

            Map<String, String> references = new LinkedHashMap<String, String>();

            MavenProject project = null;

            for ( Throwable exception : result.getExceptions() )
            {
                ExceptionSummary summary = handler.handleException( exception );

                logSummary( summary, references, "", cliRequest.showErrors );

                if ( project == null && exception instanceof LifecycleExecutionException )
                {
View Full Code Here

Examples of org.apache.maven.exception.ExceptionHandler

    {
        MavenExecutionResult result = maven.execute( cliRequest.request );

        if ( result.hasExceptions() )
        {
            ExceptionHandler handler = new DefaultExceptionHandler();

            Map<String, String> references = new LinkedHashMap<String, String>();

            MavenProject project = null;

            for ( Throwable exception : result.getExceptions() )
            {
                ExceptionSummary summary = handler.handleException( exception );

                logSummary( summary, references, "", cliRequest.showErrors );

                if ( project == null && exception instanceof LifecycleExecutionException )
                {
View Full Code Here

Examples of org.apache.maven.exception.ExceptionHandler

        eventSpyDispatcher.close();

        if ( result.hasExceptions() )
        {
            ExceptionHandler handler = new DefaultExceptionHandler();

            Map<String, String> references = new LinkedHashMap<String, String>();

            MavenProject project = null;

            for ( Throwable exception : result.getExceptions() )
            {
                ExceptionSummary summary = handler.handleException( exception );

                logSummary( summary, references, "", cliRequest.showErrors );

                if ( project == null && exception instanceof LifecycleExecutionException )
                {
View Full Code Here

Examples of org.apache.maven.scm.provider.integrity.ExceptionHandler

                    scmFileList.add( new ScmFile( siMember.getTargetFilePath(), ScmFileStatus.UNKNOWN ) );
                }
                catch ( APIException ae )
                {
                    exportSuccess = false;
                    ExceptionHandler eh = new ExceptionHandler( ae );
                    getLogger().error( "MKS API Exception: " + eh.getMessage() );
                    getLogger().debug( eh.getCommand() + " exited with return code " + eh.getExitCode() );
                }
            }
            // Lets advice the user that we've checked out all the members
            getLogger().info(
                "Exported " + scmFileList.size() + " files out of a total of " + projectMembers.size() + " files!" );
            if ( exportSuccess )
            {
                result = new ExportScmResult( "si co", scmFileList );
            }
            else
            {
                result = new ExportScmResult( "si co", "Failed to export all files!", "", exportSuccess );
            }
        }
        catch ( APIException aex )
        {
            ExceptionHandler eh = new ExceptionHandler( aex );
            getLogger().error( "MKS API Exception: " + eh.getMessage() );
            getLogger().debug( eh.getCommand() + " exited with return code " + eh.getExitCode() );
            result = new ExportScmResult( eh.getCommand(), eh.getMessage(), "Exit Code: " + eh.getExitCode(), false );
        }

        return result;
    }
View Full Code Here

Examples of org.apache.shale.view.ExceptionHandler

        if (context == null) {
            exception.printStackTrace(System.out);
            return;
        }
        ExceptionHandler handler = (ExceptionHandler)
          context.getApplication().getVariableResolver().resolveVariable
                (context, Constants.EXCEPTION_HANDLER);
        handler.handleException(exception);

    }
View Full Code Here

Examples of org.apache.struts.action.ExceptionHandler

            //
            assert context.getRequest() instanceof HttpServletRequest : "don't support ServletRequest currently.";
            assert context.getResponse() instanceof HttpServletResponse : "don't support ServletResponse currently.";
            HttpServletRequest request = ( HttpServletRequest ) context.getRequest();
            HttpServletResponse response = ( HttpServletResponse ) context.getResponse();
            ExceptionHandler handler = ( ExceptionHandler ) RequestUtils.applicationInstance( handlerClassName );
            Exception ex = throwable instanceof Exception ? ( Exception ) throwable : new Exception( throwable );
            ActionForward result = handler.execute( ex, exceptionConfig, actionMapping, form, request, response );
                   
            //
            // See if the path is really relative to the webapp root, not relative to the module.  Struts doesn't by default
            // support paths that are webapp-relative.
            //
View Full Code Here

Examples of org.apache.tuscany.sca.databinding.ExceptionHandler

    public Exception transform(Exception source, TransformationContext context) {
        DataType<DataType> sourceType = context.getSourceDataType();

        DataType<DataType> targetType = context.getTargetDataType();

        ExceptionHandler exceptionHandler = getExceptionHandler(sourceType);
        if (exceptionHandler == null) {
            return source;
        }

        Object sourceFaultInfo = exceptionHandler.getFaultInfo(source);
        Object targetFaultInfo =
            mediator.mediate(sourceFaultInfo, sourceType.getLogical(), targetType.getLogical(), context.getMetadata());

        ExceptionHandler targetHandler = getExceptionHandler(targetType);

        if (targetHandler != null) {
            Exception targetException =
                targetHandler.createException(targetType, source.getMessage(), targetFaultInfo, source.getCause());
            return targetException;
        }

        // FIXME
        return source;
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.