Examples of initCause()


Examples of ceylon.modules.CeylonRuntimeException.initCause()

        ModuleIdentifier moduleIdentifier;
        try {
            moduleIdentifier = ModuleIdentifier.fromString(name + ":" + version);
        } catch (IllegalArgumentException x) {
            CeylonRuntimeException cre = new CeylonRuntimeException("Invalid module name or version: contains invalid characters");
            cre.initCause(x);
            throw cre;
        }
        try {
            ModuleLoader moduleLoader = createModuleLoader(conf);
            Module module = moduleLoader.loadModule(moduleIdentifier);
View Full Code Here

Examples of com.almilli.movierentals.LoginException.initCause()

                    throw new LoginException(MessageFormat.format(pattern, getName()));
                }
       
      } catch (IOException e) {
                LoginException io = new LoginException("A server error occurred when logging in user.");
        io.initCause(e);
        throw io;
      }
           
            //now force the queue to be synced up so that we will know what is in the queue
            //and what isn't
View Full Code Here

Examples of com.amazonaws.AmazonClientException.initCause()

        try {
            toReturn = future.get();
        } catch ( InterruptedException ie ) {
            Thread.currentThread().interrupt();
            AmazonClientException ce = new AmazonClientException("Thread interrupted while waiting for execution result");
            ce.initCause(ie);
            throw ce;
        } catch (ExecutionException ee ) {
            //if the cause of the execution exception is an SQS exception, extract it
            //and throw the extracted exception to the clients
            //otherwise, wrap ee in an SQS exception and throw that.
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.flow.ActivityTaskFailedException.initCause()

                        falure.getDetails());
            }
            // Unless there is problem in the framework or generic activity implementation this shouldn't be executed
            ActivityTaskFailedException failure = new ActivityTaskFailedException(0, activityType, parameters.getActivityId(),
                    e.getMessage(), null);
            failure.initCause(e);
            throw failure;
        }
        return result;
    }
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.flow.ChildWorkflowFailedException.initCause()

                throw e;
            }
            // Unless there is problem in the framework or generic workflow implementation this shouldn't be executed
            Exception failure = new ChildWorkflowFailedException(0, childExecution, parameters.getWorkflowType(), e.getMessage(),
                    "null");
            failure.initCause(e);
            throw failure;
        }

        @Override
        protected void doFinally() throws Throwable {
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.flow.StartChildWorkflowFailedException.initCause()

        catch (Throwable e) {
            // This cause is chosen to represent internal error for sub-workflow creation
            String cause = StartChildWorkflowExecutionFailedCause.OPEN_CHILDREN_LIMIT_EXCEEDED.toString();
            StartChildWorkflowFailedException failure = new StartChildWorkflowFailedException(0, childExecution, workflowType,
                    cause);
            failure.initCause(e);
            throw failure;
        }
        finally {
            reply.set(new StartChildWorkflowReplyImpl(result, runId));
        }
View Full Code Here

Examples of com.arjuna.ats.jta.exceptions.InactiveTransactionException.initCause()

      }
      catch (org.omg.CosTransactions.WrongTransaction wt)
      {
                InactiveTransactionException inactiveTransactionException = new InactiveTransactionException(
            jtaLogger.loggerI18N.getString("com.arjuna.ats.internal.jta.transaction.jts.wrongstatetx"));
                inactiveTransactionException.initCause(wt);
                throw inactiveTransactionException;
      }
      catch (org.omg.CosTransactions.NoTransaction e1)
      {
                IllegalStateException illegalStateException = new IllegalStateException(jtaLogger.loggerI18N.getString("com.arjuna.ats.internal.jta.transaction.jts.notx"));
View Full Code Here

Examples of com.arjuna.ats.jta.exceptions.InvalidTerminationStateException.initCause()

        //    jtaLogger.loggerI18N.getString("com.arjuna.ats.internal.jta.transaction.jts.invalidtx2"));
      }
      catch (org.omg.CORBA.SystemException e7)
      {
                InvalidTerminationStateException invalidTerminationStateException = new InvalidTerminationStateException();
                invalidTerminationStateException.initCause(e7);
                throw invalidTerminationStateException;
      }
      finally
      {
        TransactionImple.removeTransaction(this);
View Full Code Here

Examples of com.arjuna.ats.jta.exceptions.UnexpectedConditionException.initCause()

        }
        catch (final Exception ex)
        {
            UnexpectedConditionException e = new UnexpectedConditionException();
           
            e.initCause(ex);
           
            throw e;
        }
    }
   
View Full Code Here

Examples of com.datastax.driver.core.exceptions.DriverInternalError.initCause()

                try {
                    list.add(readOne());
                } catch (DriverInternalError e) {
                    DriverInternalError ex = new DriverInternalError(String.format("Exception while parsing '%s' around char %d", str, idx));
                    ex.initCause(e);
                    throw ex;
                }
            }
            throw new DriverInternalError(String.format("Syntax error parsing '%s' at char %d: unexpected end of string", str, idx));
        }
View Full Code Here
TOP
Copyright © 2015 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.