/** 
 * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not 
 * use this file except in compliance with the License. A copy of the License 
 * is located at
 * 
 * 	http://aws.amazon.com/apache2.0/
 * 
 * or in the "LICENSE" file accompanying this file. This file is distributed 
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
 * express or implied. See the License for the specific language governing 
 * permissions and limitations under the License.
 */
package awslabs.labutility;

import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;

/**
 * Project: LabUtility
 * 
 */
public class LabUtility {
    public static void dumpError(Exception ex)
    {
        if (ex instanceof AmazonServiceException)
        {
            AmazonServiceException ase = (AmazonServiceException)ex;
            System.out.println();
            System.out.println("Caught an AmazonServiceException, which means your request made it AWS,");
            System.out.println("but was rejected with an error response for some reason.");
            System.out.println("Error Message:    " + ase.getMessage());
            System.out.println("HTTP Status Code: " + ase.getStatusCode());
            System.out.println("AWS Error Code:   " + ase.getErrorCode());
            System.out.println("Error Type:       " + ase.getErrorType());
            System.out.println("Request ID:       " + ase.getRequestId());
            System.out.println("Stack trace:");
            System.out.println(ase.getStackTrace());
        }
        else if (ex instanceof AmazonClientException)
        {
            AmazonClientException ace = (AmazonClientException)ex;
            System.out.println();
            System.out.println("Caught an AmazonClientException, which means the client encountered");
            System.out.println("a problem without before communicating with the service.");
            System.out.println("Error Message: " + ace.getMessage());
            System.out.println("Stack trace:");
            System.out.println(ace.getStackTrace());
        }
        else
        {
            System.out.println();
            System.out.println("Caught exception [" + ex.getClass() + "].");
            System.out.println("Error Message: " + ex.getMessage());
            System.out.println("Cause: " + ex.getCause());
            System.out.println("Stack trace:");
            System.out.println(ex.getStackTrace());
        }
    }
}

@@ -1617,33 +1617,16 @@
     
-System.out.println(ase.ge
+ase.prin
 tSta
@@ -1626,33 +1626,32 @@
 rintStackTrace()
-)
 ;%0A        %7D%0A    
@@ -2140,33 +2140,16 @@
     
-System.out.println(ace.ge
+ace.prin
 tSta
@@ -2149,33 +2149,32 @@
 rintStackTrace()
-)
 ;%0A        %7D%0A    
@@ -2495,32 +2495,15 @@
     
-System.out.println(ex.ge
+ex.prin
 tSta
@@ -2511,17 +2511,16 @@
 kTrace()
-)
 ;%0A      

Fix LabUtility.dumpError's print stack trace