Errors are indicated by returning a NULL-equivalent value, and functions are provided to query the last error message.