-
Notifications
You must be signed in to change notification settings - Fork 0
Exceptions
Jörg Neumann edited this page Feb 20, 2022
·
3 revisions
The public parts of the logging API, that will be used outside the API MUST NOT throw any exceptions.
Otherwise the using developer would have to catch all the exceptions, that the logging-API might throw, though there is no reasonable way to handle them:
- logging would obviously not work
- making the entire application crash, might be a little bit too extreme
- catching and ignoring the exception will create an ATC-finding
- writing some bogus-code like "CLEAR sy-subrc." would satisfy the ATC but mess up the code
As the using developer has no chance to find a "nice" or "clean" way to handle exceptions, the API will just ignore invalid calls, which allows the using developer to concentrate on the "happy path".
As we still needed a way to find issues with the log writer integration, the exceptions were not just removed, but replaced by assertions (see: Central Concepts -> Assertions).