Class JKExceptionUtil

java.lang.Object
com.jk.core.exceptions.handler.JKExceptionUtil

public class JKExceptionUtil extends Object
This class is an utility class for working with exceptions.

This class provides method to handle, log, and manage the exceptions inside the JK-Framework.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • JKExceptionUtil

      public JKExceptionUtil()
  • Method Details

    • handle

      public static void handle(Throwable t)
      This method handles the given throwable in a custom manner.

      a RuntimeException might be thrown after handling.

      Parameters:
      t - Specifies the exception that needs to be handled.
    • handle

      public static void handle(Throwable t, boolean throwRuntimeException)
      This method handles the given throwable in a custom manner.
      Parameters:
      t - Specifies the exception.
      throwRuntimeException - If true, a RuntimeException might be thrown after handling.
    • throww

      public static void throww(Throwable t)
      This method throws an exception depending on the specified throwable.
      Parameters:
      t - Specifies the throwable responsible for the exception.