Class SpartanNativeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.spartan.api.exception.SpartanNativeException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionSpartanNativeException(@NotNull String message, int errorCode) Creates a new native exception with a message and error code.SpartanNativeException(@NotNull String message, @NotNull Throwable cause, int errorCode) Creates a new native exception with a message, cause, and error code. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SpartanNativeException
Creates a new native exception with a message and error code.- Parameters:
message- the error messageerrorCode- the native error code returned by C++
-
SpartanNativeException
-
-
Method Details
-
getErrorCode
public int getErrorCode()Returns the native error code from C++.- Returns:
- the error code (-1 typically indicates failure)
-