5.2.5hdfql_error_get_message
Syntax
char *hdfql_error_get_message(void)
Description
Get the error message of the last executed operation. In other words, this function returns the message of the error that was raised during the last call to hdfql_execute.
Parameter(s)
None
Return
char * – pointer to the message of an error that has occurred during the last executed operation. If the last executed operation was successful, the pointer will be NULL.
Example(s)
// execute script (composed of only one operation (i.e. CREATE FILE my_file.h5), which is syntactically correct)
hdfql_execute("CREATE FILE my_file.h5");
// display message of an error that occurred during the last executed operation (should be "NULL")
printf("%s\n", hdfql_error_get_message());
// execute script (composed of only one operation (i.e. CREATE FILEX my_file.h5), which is syntactically incorrect due to a typo in "FILEX")
hdfql_execute("CREATE FILEX my_file.h5");
// display message of an error that occurred during the last executed operation (should be "Unknown token “FILEX”")
printf("%s\n", hdfql_error_get_message());