Skip to main content Skip to complementary content

setOnError method

Warning noteDEPRECATED.

This API is deprecated and may be removed in a future version.

qlik.setOnError(onError, onWarning)

Registers a callback for error handling. Standard Qlik Sense error handling is used if this method is not called.

Version history

Version history
Version state Details
Introduced 1.0
Updated 2.1
Deprecated

Qlik Sense February 2018

Use instead: app.on() or global.on()

Parameters

onError

Type: Function

Error handling function

onWarning

Type: Function

Optional.

Warning handling function.

Introduced in version 2.1.

Example

qlik.setOnError(function(error) {
	//contains code, message
	alert(error.message);
},
function(warning){
	window.console.log(warning);
});
Tip noteSee Loading external and internal modules for more example of use.