SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.23k forks source link

ResourceModel constructor error messages #993

Closed Hirse closed 7 years ago

Hirse commented 8 years ago

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

akudev commented 8 years ago

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

Hirse commented 8 years ago

Thanks @akudev, that makes sense.

loginger commented 7 years ago

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