Skip to Content
0

Catch error for Model.loadData

Apr 13 at 12:42 PM

185

avatar image
Former Member

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));

unbenannt.png (20.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nakul Patel
Apr 13 at 01:01 PM
0

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

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0