Skip to content

add: CpcErr struct to separate internal errors - #6

Merged
steve-chavez merged 1 commit into
masterfrom
better-err
Jul 13, 2026
Merged

add: CpcErr struct to separate internal errors#6
steve-chavez merged 1 commit into
masterfrom
better-err

Conversation

@steve-chavez

Copy link
Copy Markdown
Member

Problem

It's unwieldy to have to look for a string to differentiate internal error messages. Right now we have to check for arena surpassed and no progress, but these are not regular parse errors.

Solution

Change CpcResult to have a CpcErr field insted of a simple const char* err, this lets differentiate between internal errors and regular parse errors.

This is a BREAKING CHANGE.

Problem
-------

It's unwieldy to have to look for a string to differentiate internal
error messages. Right now we have to check for `arena surpassed` and `no
progress`, but these are not regular parse errors.

Solution
--------

Change CpcResult to have a `CpcErr` field insted of a simple `const
char* err`, this lets differentiate between internal errors and regular
parse errors.

This is a BREAKING CHANGE.
@steve-chavez
steve-chavez merged commit da1eac1 into master Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant