Defined in header <fkYAML/exception.hpp>
fkyaml::exception::what¶
Returns an error message for an exception. If nothing, a non-null, empty string will be returned.
Example
#include <iostream>
#include <fkYAML/node.hpp>
int main() {
try {
throw fkyaml::exception("An error message.");
}
catch (const fkyaml::exception& e) {
std::cout << e.what() << std::endl;
}
return 0;
}
output: