hw_RegisterError -- register a new error code (V5.0)
int error = hw_RegisterError(STRPTR msg);
This function can be used to register custom Hollywood error codes. All functions that return a standard Hollywood error code may return this custom error code then to make Hollywood show the specified error message. The string you pass to this function may contain a %s or %ld wildcard. If that is the case, Hollywood will replace these wildcards with the values set using hw_SetErrorString() and hw_SetErrorCode().

Hollywood will make a copy of the string you pass to this function so you may free it once hw_RegisterError() returns.

This function should only be called in your InitPlugin() function.

See Error codes for more information on standard Hollywood error codes.

Designer compatibility
Supported since Designer 4.0

null-terminated string describing the error message
new error code or ERR_MEM in case of an error

Show TOC