update example c++ error reporting