error
Description​
This event is fired when an error within alphatab occurred. Use this event as global error handler to show errors to end-users. Due to the asynchronous nature of alphaTab, no call to the API will directly throw an error if it fails. Instead a signal to this error handlers will be sent.
errorJavaScript |
alphaTab.errorjQuery |
alphaTab.errorHTML |
Error.net |
errorAndroid |
Types​
Action<Error>.net |
function(error)JavaScript |
(error: alphaTab.core.ecmaScript.Error) -> UnitAndroid |
Parameters​
Parameters | Type | Summary |
---|---|---|
detailsAll | Error | The object containing the error details. |
Examples​
- JavaScript
- HTML
- jQuery
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.error.on((error) {
displayError(error);
});
$('#alphaTab').on('alphaTab.error', (e, error) => {
displayError(error);
});
document.querySelector('#alphaTab').addEventListener('alphaTab.error', (e) => {
displayError(e.detail);
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.Error.On((error) =>
{
DisplayError(error);
});
val api = AlphaTabApi<MyControl>(...)
api.error.on { error ->
displayError(error)
}