Skip to main content

Errors

The most important function of Streply is to catch errors and exceptions from the application. The integration is very simple, just calling one method in the catch instruction.

JavaScript
Streply.Error('request from JS');

Add some parameters:

JavaScript
Streply.Error('request from JS', {
"name": "Joey",
"gender": "male"
});

Capture error with error level:

JavaScript
Streply.Error('request from JS', {}, Streply.Level.Critical);
tip

See available Error levels.

Exceptions‚Äč

Catch exception:

JavaScript
try {
nonExistsFunc("Welcome!");
} catch(err) {
Streply.Exception(err);
}