Package gnu.kawa.util

Class ExitCalled

  • All Implemented Interfaces:
    java.io.Serializable

    public class ExitCalled
    extends java.lang.Error
    Helper class for running finally-blocks when exit is invoked. Usage when starting thread:
     try {
         ExitCalled.push();
         run_stuff();
     } finally {
         ExitCalled.pop();
     }
     
    To exit, invoking finally-handlers, do:
     ExitCalled.doExit(exitCode);
     
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ExitCalled​(int exitCode)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void doExit​(int exitCode)  
      int getExitCode()  
      static int nesting()  
      static int pop()  
      static void push()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ExitCalled

        public ExitCalled​(int exitCode)
    • Method Detail

      • push

        public static void push()
      • pop

        public static int pop()
      • nesting

        public static int nesting()
      • getExitCode

        public int getExitCode()
      • doExit

        public static void doExit​(int exitCode)