lib/cpp: public Exception constructor