protected void sendEmail(String message, Exception ex) {
        StackTraceElement[] stackTrace = ex.getStackTrace();
        StringBuilder builder = new StringBuilder();
        for (StackTraceElement ste : stackTrace) {
            builder.append(ste.toString() + "\n");
        }
        sendEmail(message, builder.toString());
    }
protected void sendEmail ( String message , Exception ex ) { StackTraceElement [ ] stackTrace = ex . getStackTrace ( ) ; StringBuilder builder = new StringBuilder ( ) ; for ( StackTraceElement ste : stackTrace ) { builder . append ( ste . toString ( ) + "\n" ) ; } sendEmail ( message , builder . toString ( ) ) ; }
@param message
@param ex