MakeError

Map an expression node to a binary operator with the specified implementation.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/ExpressionParserTypes.h

Include

#include "Misc/ExpressionParserTypes.h"

Syntax

*return MakeError
(
    FExpressionError)
)

Remarks

Map an expression node to a binary operator with the specified implementation.

The callable type must match the declaration Ret(OperandL, OperandR, [, Context]), where: Ret = Any DEFINE_EXPRESSION_NODE_TYPE type, OR FExpressionResult OperandL = Any DEFINE_EXPRESSION_NODE_TYPE type OperandR = Any DEFINE_EXPRESSION_NODE_TYPE type Context = (optional) const ptr to user-supplied arbitrary context

Examples that binds a '/' token to a function that attempts to do a division: JumpTable.MapUnary([](double A, double B){ return A / B; }); // Runtime exception on div/0 JumpTable.MapUnary([](double A, double B, FMyContext* Ctxt){ if (!Ctxt->IsMathEnabled()) { return A; } return A / B; // Runtime exception on div/0 }); JumpTable.MapUnary([](double A, double B, const FMyContext* Ctxt) -> FExpressionResult { if (!Ctxt->IsMathEnabled()) { return MakeError(FExpressionError)); } else if (B == 0) { /**

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss