void () { if (completed.getAndSet(true)) { resume(); return; } try { sessionPausedImpl(); } catch (Throwable t) { println("Exception caught: " + t + ", " + t.getMessage(), ProcessOutputTypes.SYSTEM); //noinspection CallToPrintStackTrace t.printStackTrace(); resume(); } }