Function TVMFFIErrorCreateWithCauseAndExtraContext

Function TVMFFIErrorCreateWithCauseAndExtraContext#

Function Documentation#

int TVMFFIErrorCreateWithCauseAndExtraContext(const TVMFFIByteArray *kind, const TVMFFIByteArray *message, const TVMFFIByteArray *backtrace, TVMFFIObjectHandle cause_chain, TVMFFIObjectHandle extra_context, TVMFFIObjectHandle *out)#

Create an initial error object with cause chain and extra context.

Parameters:
  • kind – The kind of the error.

  • message – The error message.

  • backtrace – The backtrace of the error.

  • cause_chain – The cause error chain that caused this error to be raised.

  • extra_context – The extra context that can be used to record additional information.

  • out – The output error object handle.

Returns:

0 on success, nonzero on failure.