Defined in header <fkYAML/exception.hpp>
fkyaml::exception::what¶
Returns an error message for an exception. If nothing, a non-null pointer to an empty string will be returned.
Return Value¶
An error message for an exception or a non-null pointer to an empty string.
Examples¶
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: