Error Management - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.7
Category
Reference Guide

AFS Widgets come with a default error handler that displays a brief summary of the encountered problem.

A custom error management can be used through the help of a JavaScript callback. This way let a complete choice of the action to be taken. The custom function receives the information relative to the current problem to help taking a decision. Setting a custom error handler deactivates the default one.

However, the custom handler can only be installed after the full initialization of the application. So, the default handler stays active until the custom one replaces it.

Here is an example of a custom error handler defined directly in a JavaScript configuration:

var AFSWidgetConfiguration = {
errorCallback: function(stacktrace){
console.log('Nothing happened...');
}
};