styleguides icon indicating copy to clipboard operation
styleguides copied to clipboard

Add exception bubble up example in Exception Catching chapter

Open nununo opened this issue 2 years ago • 4 comments

In the Exceptions catching chapter I believe it would be useful to provide an example of exception bubbling, making it clear that, while exception throwing is to be done any levels, handling exceptions should only be done at the highest level possible. Exemplifying that exceptions which are left unhandled at a given level will automatically bubble up to the next (depending on them being declared and from which top exception they inherit, of course).

nununo avatar Aug 24 '21 11:08 nununo

Is this not adequately described here?

pokrakam avatar Aug 24 '21 14:08 pokrakam

Hum... indeed it is. But now I'm confused. I was fully convinced that the main document contained all the information and never really explored the sub-sections.

I can't find the text you linked in the main document. Will the sub-sections be incorporated in the main document at some point in the future?

nununo avatar Aug 24 '21 14:08 nununo

It's easy to miss, the only link is at the end of https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#throw-cx_static_check-for-manageable-exceptions It's worth exploring the sub-sections directly from here https://github.com/SAP/styleguides/tree/main/clean-abap/sub-sections

The guide could probably benefit from a bit of restructuring, it seem like we have 90% in one huge section and 10% in a handful of subsections.

pokrakam avatar Aug 24 '21 14:08 pokrakam

The guide could probably benefit from a bit of restructuring, it seem like we have 90% in one huge section and 10% in a handful of subsections.

I fully agree. I rely heavily on Clean ABAP, have read through it several times, and only now (thanks to you) did I find that the monolithic text isn't the whole of it!

And that link is really easy to miss because, since there is no distinction between internal and external links, I was convinced it was an external link to another page by Uncle Bob.

nununo avatar Aug 24 '21 14:08 nununo