Class ErrorUtil

java.lang.Object
de.Keyle.MyPet.api.util.ErrorUtil

public class ErrorUtil extends Object
Utility class for centralized error reporting. Handles logging to console and automatic Sentry error reporting.
  • Method Details

    • report

      public static void report(Throwable e)
      Reports an error with SEVERE level. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      e - the exception to report
    • report

      public static void report(String message, Throwable e)
      Reports an error with SEVERE level and custom message. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      message - custom error message
      e - the exception to report
    • reportWarning

      public static void reportWarning(Throwable e)
      Reports a warning-level error. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      e - the exception to report
    • reportWarning

      public static void reportWarning(String message, Throwable e)
      Reports a warning-level error with custom message. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      message - custom warning message
      e - the exception to report
    • reportError

      public static void reportError(Throwable e)
      Reports an error-level error. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      e - the exception to report
    • reportError

      public static void reportError(String message, Throwable e)
      Reports an error-level error with custom message. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      message - custom error message
      e - the exception to report
    • reportSevere

      public static void reportSevere(Throwable e)
      Reports a severe-level error. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      e - the exception to report
    • reportSevere

      public static void reportSevere(String message, Throwable e)
      Reports a severe-level error with custom message. Logs to console with full stack trace and sends to Sentry if enabled.
      Parameters:
      message - custom error message
      e - the exception to report