Skip to Content
2
Nov 13, 2012 at 08:01 AM

Why have the exception constructor attributes to by public instances attributes?

592 Views

Hallo,

if I write my own class based exception, I have no chance to directly edit the constructor.

Does anybody knows, why there is such a restriction?

If I want to expand the exception class constructor with own method attributes, I have to define non-private (public) instance attributes in the exception class ! After a new generation of the class, the public instance attributes are also attributes of the exception class constructor.

What is the idea behind such a concept? It my opinion, it is a bad objectorientated design.

I really don't want to have public instance attributes. I just want a have the possibility to edit my exception class constructor with new constructor method attributes. My instance attributes should be private !

Does anybody know if there is a possibility to generate an exception class like a normal other ABAP class !

Does anybody knows why SAP has made these restrictions?

Sincerely

Steffen