onError

fires when assert receives the 'false' value, i.e. when assertion fails

boolean onError(string errorMessage);
errorMessagestringa string with an error from the assert method
booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

scheduler.attachEvent("onError", function(errorMessage){
    scheduler.message({
        text:"Error"
    });
    return true;
});

Details

The event is blockable. Returning false will prevent the default behavior (showing error message in a red box at the top right corner)

Change log

added in version 6.0

Back to top