Custom error management strategy


Would it be possible to allow ChaiScript to not throw exceptions at all and let the user provide a function to be called when there is an exception somewhere?
I’m thinking about the very common case of games which deactivate exceptions.


I’m going to have to say categorically “no” on this one. Officially there is no “C++ without exceptions” (the standard library requires exceptions in many cases) and even game developers are moving their code bases to stop disabling exceptions, from what I’ve read.

It’s too fundamental to good error design, and it is through exception stack unwinding that we generate our ChaiScript error traces. I honestly do not believe it would be possible to make ChaiScript work in an exception-disabled environment without re-writing it.


It’s fine for my project, I do use exception indeed but I had the impression that the no-exception rule was still pervasive in particular in console game dev.

Maybe an rational paragraph copy/pasted from what you said, or just a link to this thread in the documentation would help people quickly figure out about this important point.