tinyspline icon indicating copy to clipboard operation
tinyspline copied to clipboard

Different exceptions for different kinds of errors

Open msteinbeck opened this issue 4 years ago • 0 comments

TS_MALLOC => https://en.cppreference.com/w/cpp/memory/new/bad_alloc TS_INDEX_ERROR => https://en.cppreference.com/w/cpp/error/out_of_range TS_U_UNDEFINED => https://en.cppreference.com/w/cpp/error/domain_error TS_IO_ERROR => custom (e.g. io_error) Remaining => https://en.cppreference.com/w/cpp/error/invalid_argument

Errors can be mapped to C++ exceptions using a single macro. Swig provides the following exceptions:

bad_alloc => SWIG_MemoryError out_of_range => SWIG_IndexError domain_error => SWIG_ValueError custom (io_error) => SWIG_IOError invalid_argument => SWIG_ValueError

msteinbeck avatar Apr 20 '20 21:04 msteinbeck