Class SpartanNativeException

All Implemented Interfaces:
Serializable

public class SpartanNativeException extends RuntimeException
Exception thrown when a native Spartan engine operation fails.

This can occur during:

  • Model registration/unregistration
  • Tick operations
  • Any FFM call that returns an error code
See Also:
  • Constructor Details

    • SpartanNativeException

      public SpartanNativeException(@NotNull @NotNull String message, int errorCode)
      Creates a new native exception with a message and error code.
      Parameters:
      message - the error message
      errorCode - the native error code returned by C++
    • SpartanNativeException

      public SpartanNativeException(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, int errorCode)
      Creates a new native exception with a message, cause, and error code.
      Parameters:
      message - the error message
      cause - the underlying cause
      errorCode - the native error code
  • Method Details

    • getErrorCode

      public int getErrorCode()
      Returns the native error code from C++.
      Returns:
      the error code (-1 typically indicates failure)