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

Use C++ exceptions for better error handling #35

Merged
merged 8 commits into from
Nov 11, 2015
Merged

Use C++ exceptions for better error handling #35

merged 8 commits into from
Nov 11, 2015

Conversation

MaxKellermann
Copy link
Contributor

No description provided.

Prepare for using C++ exceptions to skip dangerous code paths early.
Instead of returning bogus data, throw an exception to jump right to
the error handler.
It's illegal to reinitialize a cRequestPacket instance, and this is
a software bug, not a runtime error.
All "false" code paths have been changed to throw an exception.  This
is a big code simplification which also makes the code safer.  Many
caller locations did not check for errors.
The "new" operator throws std::bad_alloc on allocation failure.  No
need to check for NULL.
FernetMenta added a commit that referenced this pull request Nov 11, 2015
Use C++ exceptions for better error handling
@FernetMenta FernetMenta merged commit 5a74a96 into kodi-pvr:master Nov 11, 2015
@MaxKellermann MaxKellermann deleted the exceptions branch November 21, 2015 23:43
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