src/org/github/solegaonkar/photography/framework/CommonUtils.java
/**
	 * Show a dialog containing the stack trace.
	 * 
	 * @param e
	 */
Show a dialog containing the stack trace.

@param e
Show a dialog containing the stack trace . @param e
public static void exception(Exception e) {
		e.printStackTrace();
		StringBuilder sb = new StringBuilder();
		sb.append(String.format("Exception in thread \"%s\" %s: %s%n", Thread.currentThread().getName(),
				e.getClass().getName(), e.getMessage()));
		for (StackTraceElement ste : e.getStackTrace()) {
			sb.append(String.format("\t at %s.%s(%s:%d)%n", ste.getClassName(), ste.getMethodName(), ste.getFileName(),
					ste.getLineNumber()));
		}
		JOptionPane.showMessageDialog(null, sb.toString(), e.getMessage(), JOptionPane.ERROR_MESSAGE);
		System.exit(0);
	}
public static void exception ( Exception e ) { e . printStackTrace ( ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( String . format ( "Exception in thread \"%s\" %s: %s%n" , Thread . currentThread ( ) . getName ( ) , e . getClass ( ) . getName ( ) , e . getMessage ( ) ) ) ; for ( StackTraceElement ste : e . getStackTrace ( ) ) { sb . append ( String . format ( "\t at %s.%s(%s:%d)%n" , ste . getClassName ( ) , ste . getMethodName ( ) , ste . getFileName ( ) , ste . getLineNumber ( ) ) ) ; } JOptionPane . showMessageDialog ( null , sb . toString ( ) , e . getMessage ( ) , JOptionPane . ERROR_MESSAGE ) ; System . exit ( 0 ) ; }
Show a dialog containing the stack trace.
Show a dialog containing the stack trace .