src/main/java/com/digitalglobe/util/maven/plugin/CloudFormationDeployMavenPlugin.java
/**
     * This function test to see if an exception is Rate exceeded.  If it is, it sets the result to true signaling
     * that the caller should retry the request.  It also waits for 1 second before returning.  The reason for this
     * error is that we are exceeding the rate of calls to the cloud formation api per second.  Resting for 1 second
     * resets the clock.
     *
     * @param ex is the exception to test for.
     * @return a flag indicating that a rety should occur.
     * @throws MojoExecutionException when the input exception wasn't a rate exceeded exception.
     */
This function test to see if an exception is Rate exceeded.  If it is, it sets the result to true signaling
that the caller should retry the request.  It also waits for 1 second before returning.  The reason for this
error is that we are exceeding the rate of calls to the cloud formation api per second.  Resting for 1 second
resets the clock.

@param ex is the exception to test for.
@return a flag indicating that a rety should occur.
@throws MojoExecutionException when the input exception wasn't a rate exceeded exception.
This function test to see if an exception is Rate exceeded . If it is it sets the result to true signaling that the caller should retry the request . It also waits for 1 second before returning . The reason for this error is that we are exceeding the rate of calls to the cloud formation api per second . Resting for 1 second resets the clock . @param ex is the exception to test for . @return a flag indicating that a rety should occur . @throws MojoExecutionException when the input exception wasn ' t a rate exceeded exception .
private boolean isRetry(Exception ex) throws MojoExecutionException{
        if ((ex.getMessage() != null) && ex.getMessage().contains("Rate exceeded")) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException iex) {
                /* Ignore */
            }
        } else {
            throw ex.getClass().isAssignableFrom(MojoExecutionException.class) ?
                    (MojoExecutionException) ex :
                    new MojoExecutionException("CloudFormation Error: " + ex.getMessage(), ex);
        }
        return true;
    }
private boolean isRetry ( Exception ex ) throws MojoExecutionException { if ( ( ex . getMessage ( ) != null ) && ex . getMessage ( ) . contains ( "Rate exceeded" ) ) { try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException iex ) { /* Ignore */ } } else { throw ex . getClass ( ) . isAssignableFrom ( MojoExecutionException . class ) ? ( MojoExecutionException ) ex : new MojoExecutionException ( "CloudFormation Error: " + ex . getMessage ( ) , ex ) ; } return true ; }
This function test to see if an exception is Rate exceeded.
This function test to see if an exception is Rate exceeded .
// Check the exception message.