From 93f5e934804d1b62d5c4751562056d8185c7c707 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Tue, 2 Jun 2026 17:12:14 -0400 Subject: [PATCH] Add an error type for circular references --- include/akerror.tmpl.h | 1 + src/error.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/akerror.tmpl.h b/include/akerror.tmpl.h index bdeb586..4f50d39 100644 --- a/include/akerror.tmpl.h +++ b/include/akerror.tmpl.h @@ -37,6 +37,7 @@ #define AKERR_BEHAVIOR (AKERR_LAST_ERRNO_VALUE + 13) #define AKERR_RELATIONSHIP (AKERR_LAST_ERRNO_VALUE + 14) #define AKERR_EOF (AKERR_LAST_ERRNO_VALUE + 15) +#define AKERR_CIRCULAR_REFERENCE (AKERR_LAST_ERRNO_VALUE + 16) #ifndef AKERR_MAX_ERR_VALUE #define AKERR_MAX_ERR_VALUE (AKERR_LAST_ERRNO_VALUE + 15) diff --git a/src/error.c b/src/error.c index e027053..91a7cf9 100644 --- a/src/error.c +++ b/src/error.c @@ -69,6 +69,7 @@ void akerr_init() akerr_name_for_status(AKERR_VALUE, "Value Error"); akerr_name_for_status(AKERR_BEHAVIOR, "Behavior Error"); akerr_name_for_status(AKERR_RELATIONSHIP, "Relationship Error"); + akerr_name_for_status(AKERR_CIRCULAR_REFERENCE, "Circular Reference Error"); #if (defined(AKERR_USE_STDLIB) && AKERR_USE_STDLIB == 1) || (!defined(AKERR_USE_STDLIB)) akerr_init_errno(); #endif