F.1.12. rascal_get_errmsg

viod rascal_get_errmsg(
	rrid_t,
	char *buffer,
	unsigned int buffer_size
);

This function can be used to retreive a human readable error descriptions. The rrid_t parameter is the error code. Buffer and buffer_size define the location that receives the error description as a null-terminated string. If the buffer is not large enough, the message will be truncated.

Sample use:

if (!rascal_isok(rascal_do_something())) {
	char message[1024];
	rascal_get_errmsg(rid, message, sizeof(message));
	printf("Error: %s\n", message);
}

The messages are returned using the system default language, usually U.S. English.