Klasse ZenithAPIException

Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
APIUnavailableException

public class ZenithAPIException extends RuntimeException
Base exception class for all API-related exceptions in Zenith-Mod.

This exception is thrown when an API call fails or encounters an error. All API exceptions should extend this class.

Example:


 try {
     // Some API operation
 } catch (ZenithAPIException e) {
     getLogger().severe("API error: " + e.getMessage());
     e.printStackTrace();
 }
 
Seit:
1.2.3
Autor:
Zenith-Studios
Siehe auch:
  • Konstruktordetails

    • ZenithAPIException

      public ZenithAPIException()
      Constructs a new ZenithAPIException with no detail message.

      Example:

      
       throw new ZenithAPIException();
       
    • ZenithAPIException

      public ZenithAPIException(@Nullable @Nullable String message)
      Constructs a new ZenithAPIException with the specified detail message.

      Example:

      
       throw new ZenithAPIException("Failed to process ban request");
       
      Parameter:
      message - The detail message
    • ZenithAPIException

      public ZenithAPIException(@Nullable @Nullable String message, @Nullable @Nullable Throwable cause)
      Constructs a new ZenithAPIException with the specified detail message and cause.

      Example:

      
       try {
           // Some operation that might fail
       } catch (SQLException e) {
           throw new ZenithAPIException("Database error occurred", e);
       }
       
      Parameter:
      message - The detail message
      cause - The cause of this exception
    • ZenithAPIException

      public ZenithAPIException(@Nullable @Nullable Throwable cause)
      Constructs a new ZenithAPIException with the specified cause.

      Example:

      
       try {
           // Some operation
       } catch (Exception e) {
           throw new ZenithAPIException(e);
       }
       
      Parameter:
      cause - The cause of this exception