Examples of RecoverableException


Examples of com.google.appengine.tools.mapreduce.impl.shardedjob.RecoverableException

          inputExhausted = true;
          break;
        } catch (IOException e) {
          if (workerCalls == 0) {
            // No progress, lets retry the slice
            throw new RecoverableException("Failed on first input", e);
          }
          // We made progress, persist it.
          log.log(Level.WARNING, "An IOException while reading input, ending slice early", e);
          break;
        }
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.shardedjob.RecoverableException

  @Override
  protected void callWorker(KeyValue<ByteBuffer, ByteBuffer> input) {
    try {
      inMemSorter.addValue(input.getKey(), input.getValue());
    } catch (Exception ex) {
      throw new RecoverableException("sort worker failure", ex);
    }
  }
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

        return new DateTime(getTime(), Defaults.getTimeZone());
    }

    private static void ensureReplaceable() {
        if (!isReplaceable && instance != null) {
            throw new RecoverableException("Clock already set up");
        }
    }
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

                getMessageBroker().addWarning(message);
            }

            @Override
            public void raiseError(final String message) {
                throw new RecoverableException(message);
            }

            @Override
            public String getProperty(final String name) {
                return RuntimeContextFromSession.this.getProperty(name);
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

                getMessageBroker().addWarning(message);
            }

            @Override
            public void raiseError(final String message) {
                throw new RecoverableException(message);
            }

            @Override
            public String getProperty(final String name) {
                return RuntimeContextFromSession.this.getProperty(name);
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

        }

        // do it?
        final Consent validity = isProposedArgumentSetValid(target, arguments);
        if(validity.isVetoed()) {
            throw new RecoverableException(validity.getReason());
        }

        return execute(target, arguments);
    }
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

            // TODO: some duplication between this code and ActionLinkFactoryAbstract
           
            // see if is an application-defined exception
            // if so, is converted to an application error,
            // equivalent to calling DomainObjectContainer#raiseError(...)
            final RecoverableException appEx = ActionModel.getApplicationExceptionIfAny(ex);
            if (appEx != null) {
                getMessageBroker().setApplicationError(appEx.getMessage());

                // there's no need to abort the transaction, it will have already been done
                // (in IsisTransactionManager#executeWithinTransaction(...)).
                return null;
            }
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

                getMessageBroker().addWarning(message);
            }

            @Override
            public void raiseError(final String message) {
                throw new RecoverableException(message);
            }

            @Override
            public String getProperty(final String name) {
                return RuntimeContextFromSession.this.getProperty(name);
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

            LOG.error(builder.toString());
        }

        final boolean enforceSafeSemantics = getConfiguration().getBoolean(PersistenceConstants.ENFORCE_SAFE_SEMANTICS, PersistenceConstants.ENFORCE_SAFE_SEMANTICS_DEFAULT);
        if(enforceSafeSemantics) {
            throw new RecoverableException(msg);
        }
    }
View Full Code Here

Examples of org.apache.isis.applib.RecoverableException

    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
                setCategory(null);
                container.flush();
            } catch(Exception e) {
                // it's a programming mistake to throw only a recoverable exception here, because of the xactn's state.
                // the framework should instead auto-escalate this to a non-recoverable exception
                throw new RecoverableException("Demo throwing " + type.name(), e);
            }
        }
    }
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.