WowException
open class WowException(val errorCode: String, errorMsg: String, cause: Throwable? = null, val bindingErrors: List<BindingError> = emptyList()) : RuntimeException, ErrorInfo
Base exception class for the Wow framework.
WowException extends RuntimeException and implements ErrorInfo to provide standardized error handling with error codes, messages, and optional binding errors. It serves as the foundation for all framework-specific exceptions.
Example usage:
throw WowException(
errorCode = ErrorCodes.ILLEGAL_ARGUMENT,
errorMsg = "Invalid input parameter",
bindingErrors = listOf(BindingError("field", "must not be null"))
)Content copied to clipboard
Parameters
cause
the underlying cause of this exception, if any
See also
Inheritors
Constructors
Link copied to clipboard
constructor(errorCode: String, errorMsg: String, cause: Throwable? = null, bindingErrors: List<BindingError> = emptyList())
Properties
Functions
Link copied to clipboard
Converts this Throwable to standardized ErrorInfo.
Link copied to clipboard
fun Throwable.toResult(waitCommandId: String, commandMessage: CommandMessage<*>, function: FunctionInfoData = COMMAND_GATEWAY_FUNCTION, id: String = generateGlobalId(), stage: CommandStage = CommandStage.SENT, result: Map<String, Any> = emptyMap(), signalTime: Long = System.currentTimeMillis()): CommandResult
Converts a Throwable to a CommandResult representing a command failure.