Skip to content
GraphMustAddNodeL

GraphMustAddNodeL

Description

Aborting (Must*) variants of the fallible insertion macros above.

Each GraphMustXxx(...) is the statement-style do-while wrapper around the matching GraphXxx(...) expression: it calls the underlying fallible form and triggers LOG_FATAL(...) if the call fails. Unlike the plain Add forms, the Must forms do not yield a node id - they are statements, not expressions. Use these at API boundaries where allocation failure is not recoverable for the caller. Otherwise prefer the propagating forms.

Success

Returns to the caller.

Failure

Does not return - aborts via LOG_FATAL / SysAbort.

Usage example (Cross-references)

Usage examples (Cross-references)
        do {                                                                                                               \
            if (!GraphAddNodeL((g), (lval))) {                                                                             \
                LOG_FATAL("GraphMustAddNodeL failed");                                                                     \
            }                                                                                                              \
        } while (0)
    /// TAGS: Graph, Must, Abort
    ///
    #define GraphMustAddNode(g, lval) GraphMustAddNodeL((g), (lval))
    
    ///
Last updated on