notcurses/src
Marek Habersack 64eeb95f1e [C++] Optionally enable throwing exceptions on errors
Nick prefers error handling based on exceptions in all cases, while I
prefer to save exception handling for truly exceptional situations -
function parameter validation and class constructor. However, there's no
need to not support both approaches, to be chosen at the discretion of
the developer.

NCPP follows RAII and all classes throw exceptions from their
constructors in case they cannot initialize properly. Likewise,
functions taking pointers that are required validate them and throw
exceptions whenever the requirement isn't met.

This commit goes one step further in that it enables optional validation
of notcurses function return values and throwing an
exception (`ncpp::call_error`) should the function signal an error. This
is disabled by default but it can be enabled by defining the
`NCPP_EXCEPTIONS_PLEASE` macro (preferably on the command line or
before *each* inclusion of any NCPP headers).

Out of necessity, this breaks the ABI (plus I found a handful of minor
issues in the code), but I think it's worth having this support in
place.
2020-04-15 12:10:14 -04:00
..
demo highcon: hoist out loop for great speedup #468 2020-04-13 18:39:25 -04:00
input better colors on notcurses-input plot 2020-04-08 21:32:41 -04:00
lib Scrolling! all unit tests work #443 2020-04-15 11:37:57 -04:00
libcpp [C++] Sync API changes 2020-04-11 20:44:25 -04:00
ncreel enmetric->ncmetric #324 2020-02-05 20:18:11 -05:00
poc [C++] Optionally enable throwing exceptions on errors 2020-04-15 12:10:14 -04:00
pydemo get pydemo working again #459 2020-04-08 14:37:10 -04:00
tetris tetris: use background from installed path #466 2020-04-10 18:05:19 -04:00
view Rust wrapper work (#454) 2020-04-08 05:39:41 -04:00