Skip to content
This repository has been archived by the owner on Nov 18, 2019. It is now read-only.

Error handling #4

Open
2 tasks
lu-zero opened this issue Nov 2, 2018 · 3 comments
Open
2 tasks

Error handling #4

lu-zero opened this issue Nov 2, 2018 · 3 comments
Milestone

Comments

@lu-zero
Copy link
Owner

lu-zero commented Nov 2, 2018

API surface :

  • Errors as enums
  • Errors as strings

Open questions

  • Capture panics in unwind mode?
@lu-zero lu-zero added this to the First release milestone Dec 4, 2018
@dwbuiten
Copy link
Contributor

rav1e_get_last_error(ctx)?

Or some sort of struct/string.

@lu-zero
Copy link
Owner Author

lu-zero commented Mar 21, 2019

Yes, something along those lines.

The functions should all do something like this :

Return value Status
0 Success
> 0 Recoverable
< 0 Fatal

And store the actual error in the Context.

So ideally if you want to have more information it should be provided by functions like:

const char *s = rav1e_get_last_error(ctx)

@dwbuiten
Copy link
Contributor

That sounds good to me, though it would be nice to have something more akin to how we do it at FFMS2: https://github.com/FFMS/ffms2/blob/master/include/ffms.h#L89-L94

Maybe not exactly that struct, but some way to see an enum-like error is much easier to handle (e.g. EAGAIN) without strncmp. Opinion?

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

No branches or pull requests

2 participants