CRU_STRERROR (3)
CRU MANUAL
CRU_STRERROR (3)

NAME

cru_strerror - translate an error code to a readable message

SYNOPSIS

#include <cru/cru.h>

char *cru_strerror ( int err )

DESCRIPTION

Given an integer error code set by some other cru library function, this function translates it to a terse readable message similarly to the POSIX standard strerror function. POSIX error codes, error codes originating from the nthm library, and codes specific to cru are detected and the results are formatted accordingly. The latter include test failure codes, internal error codes, and those listed below. Any other error codes are reported as undiagnosed.

RETURN VALUE

The returned value is a statically allocated zero-terminated ASCII string that may be printed but should not be modified or freed. The following specific error codes are translated as shown.

CRU_BADCLS

"cru: invalid or corrupted class or partition"

CRU_BADGPH

"cru: invalid or corrupted graph"

CRU_BADKIL

"cru: invalid or corrupted kill switch"

CRU_BADPRT

"cru: invalid or corrupted partition"

CRU_DEVDBF

"cru: double free"

CRU_DEVIAL

"cru: inconsistent allocation limits"

CRU_DEVMLK

"cru: memory leak"

CRU_DEVPBL

"cru: diagnostic feature unavailable in production"

CRU_INCCON

"cru: inconsistent connectors in build specification"

CRU_INCFIL

"cru: inconsistent filter specification"

CRU_INCINV

"cru: inconsistent initial vertex in zone"

CRU_INCMRG

"cru: inconsistent merge specification"

CRU_INCMUT

"cru: inconsistent mutations"

CRU_INCSPB

"cru: inconsistent spreading builder"

CRU_INCTRP

"cru: inconsistent traversal priorities"

CRU_INCVEL

"cru: inconsistent vertex equality relation"

CRU_INTKIL

"cru: user interrupt"

CRU_INTOVF

"cru: vertex limit exceeded during build or expansion"

CRU_INTOOC

"cru: operation attempted out of context"

CRU_NULGPH

"cru: null graph"

CRU_NULCLS

"cru: null class"

CRU_NULCSF

"cru: null classifier specification"

CRU_NULKIL

"cru: null kill switch"

CRU_NULPRT

"cru: null partition"

CRU_PARDPV

"cru: duplicate vertices detected while partitioning"

CRU_PARVNF

"cru: vertex not found by partition"

CRU_TPCMPR

"cru: type conflict in map reduction destructors"

CRU_TPCMUT

"cru: type conflict in mutated destructors"

CRU_UNDANA

"cru: undefined ana function in splitter"

CRU_UNDCAT

"cru: undefined cata function in splitter"

CRU_UNDCBO

"cru: undefined conditional binary operator"

CRU_UNDCON

"cru: undefined connectors in build specification"

CRU_UNDCQO

"cru: undefined conditional quartenary operator"

CRU_UNDCTO

"cru: undefined conditional ternary operator"

CRU_UNDEFB

"cru: undefined edge fabricator"

CRU_UNDEPR

"cru: undefined edge product operator in crosser"

CRU_UNDEQU

"cru: undefined equality relation"

CRU_UNDEXP

"cru: undefined predicate in stretcher specification"

CRU_UNDHSH

"cru: undefined hash function"

CRU_UNDMAP

"cru: undefined map in fold specification"

CRU_UNDPOP

"cru: undefined postponable predicate in postponer"

CRU_UNDRED

"cru: undefined reduction in fold specification"

CRU_UNDVAC

"cru: undefined vacuous case in fold specification"

CRU_UNDVFB

"cru: undefined vertex fabricator"

CRU_UNDVPR

"cru: undefined vertex product operator in crosser"

NOTES

This function is not thread-safe and not meant for production code unless its use is restricted to a single thread context.

Error codes of the form CRU_DEVXXX are for development use involving custom builds and are not otherwise documented.

Return values of the form

nthm-X.Y.Z: internal error code nnn
cru-X.Y.Z: internal error code nnn

where "X.Y.Z" is a version number and "nnn" is a decimal internal error code number are indicative of possible bugs in these libraries worthy of a bug report including a reproducible test case.

FILES

/usr/local/include/cru/error_codes.h

SEE ALSO

cru, cru_bop, cru_bpred, cru_builder, cru_built, cru_cbop, cru_classifier, cru_class_of, cru_class_size, cru_composed, cru_composer, cru_connect, cru_connector, cru_cqop, cru_crossed, cru_crosser, cru_ctop, cru_ctop_pair, cru_ctop_quad, cru_data_types, cru_deduplicated, cru_destructor, cru_destructor_pair, cru_edge_count, cru_fabricated, cru_fabricator, cru_filter, cru_filtered, cru_fold, cru_free_kill_switch, cru_free_later, cru_free_now, cru_free_partition, cru_function_types, cru_get, cru_hash, cru_induced, cru_inducer, cru_kernel, cru_kill, cru_killed, cru_mapreduced, cru_mapreducer, cru_merged, cru_merger, cru_mutated, cru_mutator, cru_new_kill_switch, cru_nop, cru_order, cru_order_pair, cru_partition_of, cru_plan, cru_postponed, cru_postponer, cru_prop, cru_prop_pair, cru_pruner, cru_qop, cru_qpred, cru_set, cru_sig, cru_singleton, cru_split, cru_splitter, cru_spread, cru_stretch, cru_stretched, cru_stretcher, cru_subconnector, cru_terminus_count, cru_top, cru_tpred, cru_united, cru_uop, cru_vertex_count, cru_zone

AUTHOR

Dennis Furey (milonga@delayinsensitive.com)

PROJECT PAGE

https://github.com/gueststar/cru

CRU VERSION 0.15.3
October 05, 2024
CRU_STRERROR (3)