ALF supports limited capability to handle runtime errors. Upon encountering an error, the ALF runtime tries to free up resources, then exits by default. To allow the accelerated library developers to handle errors in a more graceful manner, you can register a callback error handler function to the ALF runtime. Depending on the type of error, the error handler function can direct the ALF runtime to retry the current operation, stop the current operation, or shut down. These are controlled by the return values of the callback error handler function.
When several errors happen in a short time or at the same time, the ALF runtime attempts to invoke the error handler in sequential order.
Possible runtime errors include the following:
Standard error codes on supported platforms are used for return values when an error occurs. For this implementation, the standard C/C++ header file, errno.h, is used. See Error codes and descriptions and also the API definitions in ALF API overview for a list of possible error codes.