GMP and assert()
GMP and assert()
Posted Mar 6, 2019 12:09 UTC (Wed) by excors (subscriber, #95769)In reply to: GMP and assert() by renox
Parent article: GMP and assert()
> Ideally the language should know about error return values and add an assert if the caller doesn't handle the error return value himself..
> But I don't know of a language which allow this..
> But I don't know of a language which allow this..
That sounds a lot like exceptions. Errors get propagated up the call stack until someone handles the error, and if nobody handles it then the application crashes. (Of course exceptions introduce a whole new set of problems so they're just as bad as every other approach to error handling.)
