cancel
Showing results for 
Search instead for 
Did you mean: 

Catch error for Model.loadData

manzu
Explorer
560

I call a MII Transaction to get information about the actual logged in user. It is all fine when someone is logged in, but when nobody is logged in, I always get a realy long error message in the console because of a parsing error.

How can I catch the error and get rid of the error message?

oModel.loadData(url, null));

View Entire Topic
0 Kudos

Have you looked at attachParseError to see if that would help?

https://sapui5.hana.ondemand.com/#/api/sap.ui.model.Model/methods/attachParseError

manzu
Explorer
0 Kudos

I added this to my source code before calling oModel.loadData

oModel.attachParseError(function(oEvent) {<br> console.log("Parserror");<br> });

Can't see the log entry in the console, but still the error message.