Interface TextGUIThread.ExceptionHandler

  • Enclosing interface:
    TextGUIThread

    public static interface TextGUIThread.ExceptionHandler
    This interface defines an exception handler, that is used for looking at exceptions that occurs during the main event loop of the TextGUIThread. You can for example use this for logging, but also decide if you want the exception to kill the thread.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean onIOException​(java.io.IOException e)
      Will be called when an IOException has occurred in the main event thread
      boolean onRuntimeException​(java.lang.RuntimeException e)
      Will be called when a RuntimeException has occurred in the main event thread
    • Method Detail

      • onIOException

        boolean onIOException​(java.io.IOException e)
        Will be called when an IOException has occurred in the main event thread
        Parameters:
        e - IOException that occurred
        Returns:
        If you return true, the event thread will be terminated
      • onRuntimeException

        boolean onRuntimeException​(java.lang.RuntimeException e)
        Will be called when a RuntimeException has occurred in the main event thread
        Parameters:
        e - RuntimeException that occurred
        Returns:
        If you return true, the event thread will be terminated