# 5.2.5 hdfql_error_get_message

Part of: [5 Application Programming Interface](5-application-programming-interface.md) › [5.2 Functions](5-2-functions.md)

### 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](5-2-1-hdfql-execute.md).

### 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)

```c
// 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());
```
