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

Error handling in bindings #1

Open
ear7h opened this issue Aug 9, 2018 · 0 comments
Open

Error handling in bindings #1

ear7h opened this issue Aug 9, 2018 · 0 comments
Assignees
Labels
todo things that need to be done

Comments

@ear7h
Copy link
Collaborator

ear7h commented Aug 9, 2018

This would require wrapping things in try/catch blocks and return structs.

The easiest and cleanest way to implement this might be through macros.

#define ERR_T(T) err_ ## T ##_t
#define NEW_ERR_T(T) new ERR_T(T)();
#define ERR_DEF(T) typedef struct {T *val; const char *err;} ERR_T(T);
@ear7h ear7h added the todo things that need to be done label Aug 9, 2018
@ear7h ear7h self-assigned this Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo things that need to be done
Projects
None yet
Development

No branches or pull requests

1 participant