https://bugs.documentfoundation.org/show_bug.cgi?id=42982
--- Comment #88 from Mike Kaganski <[email protected]> --- (In reply to Commit Notification from comment #87) > tdf#42982 Use IllegalTypeException Error with message Looking at commit 7153b25d4da845bfb309c75df48f9ea00ec70c47, I have a feeling that only by accident, it didn't break the API guarantees. So let me clarify an important consideration that any easyhacker here must keep in mind. I do it using the said commit as an example. The commit changed EnumerableMap::impl_initValues_throw. The function used to throw RuntimeException [1], and now it throws IllegalTypeException [2]. The function is used in EnumerableMap::initialize, which (as it is obvious from the EnumerableMap class definition) is an implementation of the XInitialization method [3]. It is important to realize, that the method is part of the published API, including its exceptions guarantee. So this change must make sure to check, that it doesn't break the API. In this case, the documentation specifies that the method throws Exception, which is luckily the ancestor of both RuntimeException and IllegalTypeException (so it is not an API break). But please make sure, that every commit that changes a thrown exception type, is careful to explain this in the commit message, and document there, which APIs the change affects, and that the change doesn't break those APIs' guarantees. [1] https://api.libreoffice.org/docs/idl/ref/exceptioncom_1_1sun_1_1star_1_1uno_1_1RuntimeException.html [2] https://api.libreoffice.org/docs/idl/ref/exceptioncom_1_1sun_1_1star_1_1beans_1_1IllegalTypeException.html [3] https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1lang_1_1XInitialization.html#a4c324e2c089ac21cc486cdf1e611e03e -- You are receiving this mail because: You are the assignee for the bug.
