Class Exception

All Implemented Interfaces:
Serializable

public class Exception extends Exception
Base class for all exceptions thrown by the VSDK
See Also:
  • Constructor Details

    • Exception

      public Exception(String message)
      Create a new exception
      Parameters:
      message - The message of the exception
    • Exception

      public Exception(String message, Throwable cause)
      Create a new exception with a message and a cause
      Parameters:
      message - The message of the exception
      cause - The cause of the exception
  • Method Details

    • printFormattedMessage

      public void printFormattedMessage()
      Log the exception with a formatted message The method outputs the exception's message and then recursively traverses its cause chain (if any), printing each cause's message in order. This allows you to easily inspect the full error context leading up to the root cause. Example: Something happened * message * cause message * cause cause message
    • getFormattedMessage

      public String getFormattedMessage()
      Get a formatted message for the exception.
      Returns:
      The returned string contains the exception's message followed by the messages of its causal chain (if any). Each nested cause is appended recursively in order, providing a human-readable trace of the error context down to the root cause. Example:
               Something happened
               * message
                * cause message
                 * cause cause message
               
    • bAssert

      public static void bAssert(boolean condition, String message) throws Exception
      Throws:
      Exception
    • cAssert

      public static void cAssert(int code, String message) throws Exception
      Throws:
      Exception
    • fAssert

      public static void fAssert(Runnable func, String message) throws Exception
      Throws:
      Exception