#include <cel_exception.h> ... try { // insert codes here } catch(Exception& e) { // output the error status. cout << e.what() << endl; }
The error message obtained by Exception::what() contains the source code point that throws the exception. And it is very useful when you're debugging the code or reporting bugs of the library to us.
Since Logs class inherits the std::exception class, you can also write the code like the following one:
#include <exception> ... try { // insert codes here } catch(std::exception& e) { // output the error status. cout << e.what() << endl; }