Skip to main content

setCalculationError

@svenvw/fdm-source


@svenvw/fdm-source / fdm-core/src / setCalculationError

Function: setCalculationError()

setCalculationError<T_Input>(fdm, calculationFunctionName, calculatorVersion, input, error_message, stack_trace): Promise<any>

Defined in: fdm-core/src/calculator.ts:112

Records an error that occurred during a calculation in the database.

Type Parameters

T_Input

T_Input extends object

The type of the input object that caused the error.

Parameters

fdm

any

The FDM instance, providing database access.

calculationFunctionName

string

The name of the calculation function where the error occurred.

calculatorVersion

string

The version of the calculator.

input

T_Input

The input object that was being processed when the error occurred.

error_message

string

The error message.

stack_trace

The stack trace of the error, if available.

string | undefined

Returns

Promise<any>

A promise that resolves when the error record is inserted.