Package org.apache.isis.applib

Examples of org.apache.isis.applib.NonRecoverableException


    private void rejectIfRequired() {
        if(behaviour == Behaviour.RejectEventsWithRecoverableException) {
            throw new RecoverableException("Rejecting event (recoverable exception thrown)");
        }
        if(behaviour == Behaviour.RejectEventsWithNonRecoverableException) {
            throw new NonRecoverableException("Rejecting event (recoverable exception thrown)");
        }
        if(behaviour == Behaviour.ThrowOtherException) {
            throw new RuntimeException("Throwing some other exception");
        }
    }
View Full Code Here


    @Prototype
    @ActionSemantics(Of.SAFE)
    public void demoException(final @Named("Type") DemoExceptionType type) {
        switch(type) {
        case NonRecoverableException:
            throw new NonRecoverableException("Demo throwing " + type.name());
        case RecoverableException:
            throw new RecoverableException("Demo throwing " + type.name());
        case RecoverableExceptionAutoEscalated:
            try {
                // this will trigger an exception (because category cannot be null), causing the xactn to be aborted
View Full Code Here

    private void onExecutedVetoIfRequired() {
        if(behaviour == Behaviour.AnyExecuteVetoWithRecoverableException) {
            throw new RecoverableException("Rejecting event (recoverable exception thrown)");
        }
        if(behaviour == Behaviour.AnyExecuteVetoWithNonRecoverableException) {
            throw new NonRecoverableException("Rejecting event (recoverable exception thrown)");
        }
        if(behaviour == Behaviour.AnyExecuteVetoWithOtherException) {
            throw new RuntimeException("Throwing some other exception");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.applib.NonRecoverableException

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.