openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

ResourceModel constructor error messages

Open Hirse opened this issue 10 years ago • 3 comments

When creating a ResourceModel, either the bundleUrl or the bundleName has to be given. If I create a ResourceModel without either of them I get an error message: 2016-05-13_15-02-51

However when trying to create the ResourceModel without any parameter, I get a different (and hard to understand error): 2016-05-13_14-59-02

From my understanding, the second case (no parameter at all) should result in the same error message (or slightly changed).

Hirse avatar May 13 '16 13:05 Hirse

Hi Jan,

the "good" error message comes from a method called at the end of the constructor, the bad one from an earlier line, so it's not as easy as extending the check. Of course it would be easy to add a new check at the beginning of the constructor, but usually we don't do extensive parameter checking all across UI5 (would add lots of code and despite of the bad wording, the issue can be found easily here, so the added value is limited). I forward this to the code owner as 1670315393 but cannot promise it will be changed.

Regards Andreas

akudev avatar May 13 '16 13:05 akudev

Thanks @akudev, that makes sense.

Hirse avatar May 13 '16 14:05 Hirse

Hi, as Andreas already said, the value is limited. We decided to leave it as it is. BR, Jan

loginger avatar Dec 01 '16 12:12 loginger