Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up dicebet/dicestatus error handling #929

Merged
merged 1 commit into from
Nov 7, 2018
Merged

Conversation

leto
Copy link

@leto leto commented Nov 7, 2018

New macro RETURN_IF_ERROR makes it very easy correctly handle CCerror from internals functions and return it in JSON. It doesn't seem worth it to convert lots of existing code to use it, but various other CCs that don't have error-checking yet can use it, like oracle/gateway/etc

Converted dicebet + dicestatus to use CCerror like the rest of dice CC, and found one place where we didn't provide an error if diceinit failed in dicebet. Now it will recognize any internals function running into an error and setting CCerror, instead of only one level of error checking inside DiceBet().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants