CoreNodeErrorHelper Class Reference

#include <corenodes_errors.h>

Detailed Description

The CoreNodeErrorHelper publishes helper functions to simplify CoreNode error handling.

Static Public Member Functions

static MAXON_METHOD Result< void > AddPortError (const MicroNodeGroupRef &group, const PortId &portId, Error &&newError)
 
static MAXON_METHOD Result< void > AddPortError (const CoreNodeGroupRef &group, const PortId &portId, Error &&newError)
 
static MAXON_METHOD Result< void > SetPortError (const MicroNodeGroupRef &group, const PortId &portId, Error &&newError)
 
static MAXON_METHOD Result< void > SetPortError (const CoreNodeGroupRef &group, const PortId &portId, Error &&newError)
 
static MAXON_METHOD Result< void > ResetPortErrors (const MicroNodeGroupRef &group, const PortId &portId)
 
static MAXON_METHOD Result< void > ResetPortErrors (const CoreNodeGroupRef &group, const PortId &portId)
 
static MAXON_METHOD Result< BoolGetPortErrors (const MicroNodeGroupRef &group, const PortId &portId, const ValueReceiver< const PortError & > &receiver)
 
static MAXON_METHOD Result< BoolGetPortErrors (const CoreNodeGroupRef &group, const PortId &portId, const ValueReceiver< const PortError & > &receiver)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (CoreNodeErrorHelper, MAXON_REFERENCE_NONE, "net.maxon.interface.corenodes.errorhelper")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( CoreNodeErrorHelper  ,
MAXON_REFERENCE_NONE  ,
"net.maxon.interface.corenodes.errorhelper"   
)
private

◆ AddPortError() [1/2]

static MAXON_METHOD Result<void> AddPortError ( const MicroNodeGroupRef &  group,
const PortId portId,
Error &&  newError 
)
static

Adds a new error to the port's error list. Current errors will remain.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to add the error.
[in]newErrorThe error to add.
Returns
OK on success. Error result if group or port are not valid.

◆ AddPortError() [2/2]

static MAXON_METHOD Result<void> AddPortError ( const CoreNodeGroupRef &  group,
const PortId portId,
Error &&  newError 
)
static

Adds a new error to the port's error list. Current errors will remain.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to add the error.
[in]newErrorThe error to add.
Returns
OK on success. Error result if group or port are not valid.

◆ SetPortError() [1/2]

static MAXON_METHOD Result<void> SetPortError ( const MicroNodeGroupRef &  group,
const PortId portId,
Error &&  newError 
)
static

Sets a new error to the port's error list. Current errors will be lost.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to set the error.
[in]newErrorThe error to set.
Returns
OK on success. Error result if group or port are not valid.

◆ SetPortError() [2/2]

static MAXON_METHOD Result<void> SetPortError ( const CoreNodeGroupRef &  group,
const PortId portId,
Error &&  newError 
)
static

Sets a new error to the port's error list. Current errors will be lost.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to set the error.
[in]newErrorThe error to set.
Returns
OK on success. Error result if group or port are not valid.

◆ ResetPortErrors() [1/2]

static MAXON_METHOD Result<void> ResetPortErrors ( const MicroNodeGroupRef &  group,
const PortId portId 
)
static

Clears the port's error list.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to reset the error list.
Returns
OK on success. Error result if group or port are not valid.

◆ ResetPortErrors() [2/2]

static MAXON_METHOD Result<void> ResetPortErrors ( const CoreNodeGroupRef &  group,
const PortId portId 
)
static

Clears the port's error list.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to reset the error list.
Returns
OK on success. Error result if group or port are not valid.

◆ GetPortErrors() [1/2]

static MAXON_METHOD Result<Bool> GetPortErrors ( const MicroNodeGroupRef &  group,
const PortId portId,
const ValueReceiver< const PortError & > &  receiver 
)
static

Reads the port's error list. Those errors make nodes and ports appear with an error state in the node editor.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to read the error list.
[out]receiverA ValueReceiver for the port's errors.
Returns
Result of the receiver. Error result if group or port are not valid.

◆ GetPortErrors() [2/2]

static MAXON_METHOD Result<Bool> GetPortErrors ( const CoreNodeGroupRef &  group,
const PortId portId,
const ValueReceiver< const PortError & > &  receiver 
)
static

Reads the port's error list. Those errors make nodes and ports appear with an error state in the node editor.

Parameters
[in]groupThe group which owns the port #portId.
[in]portIdThe port where to read the error list.
[out]receiverA ValueReceiver for the port's errors.
Returns
Result of the receiver. Error result if group or port are not valid.