postExecute method
FunctionCallPostExecutionResult?
postExecute(
- DartBlockArbiter arbiter,
- covariant FunctionCallBodyExecutionResult bodyExecutionResult
override
Implementation
@override
FunctionCallPostExecutionResult? postExecute(
DartBlockArbiter arbiter,
FunctionCallBodyExecutionResult bodyExecutionResult,
) {
if (bodyExecutionResult.customFunction.returnType != null) {
if (bodyExecutionResult.returnValue == null) {
throw CustomFunctionMissingReturnValueException(
customFunctionName,
bodyExecutionResult.customFunction.returnType!,
);
} else {
final (isCorrectType, givenWrongType) = arbiter
.verifyDataTypeOfNeoValue(
bodyExecutionResult.customFunction.returnType!,
bodyExecutionResult.returnValue!,
);
if (!isCorrectType) {
throw CustomFunctionInvalidReturnValueTypeException(
customFunctionName,
bodyExecutionResult.customFunction.returnType!,
givenWrongType!,
);
}
}
} else {
if (bodyExecutionResult.returnValue != null) {}
}
return FunctionCallPostExecutionResult(
bodyExecutionResult.customFunction,
bodyExecutionResult.returnValue?.getValue(arbiter),
);
}