protected static void harness ( PhaseApplication phase ) { try { phase . start ( ) ; phase . stop ( ) ; phase . end ( ) ; } catch ( BELRuntimeException bre ) { err . println ( bre . getUserFacingMessage ( ) ) ; systemExit ( bre . getExitCode ( ) ) ; } catch ( OutOfMemoryError oom ) { err . println ( ) ; oom . printStackTrace ( ) ; long upperlimit = getRuntime ( ) . maxMemory ( ) ; double ulMB = upperlimit * 9.53674316e-7 ; final NumberFormat fmt = new DecimalFormat ( "#0" ) ; String allocation = fmt . format ( ulMB ) ; err . println ( "\n(current allocation is " + allocation + " MB)" ) ; systemExit ( ExitCode . OOM_ERROR ) ; } }
Directs phase application lifecycle .