Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Initialize complex attributes in exception class

Former Member
0 Likes
356

Hello,

I need to initialize a timestamp attribute (TIMESTAMPL) in an exception class. However the workbench tells me I'm not allowed to modify the constructor of an exception class. But I cannot initialize an attribute of type TIMESTAMPL with the VALUE clause of a DATA statement. So what is the right way to initialize complex attributes in an exception class when the constructror cannot be modified.

Regards Thomas

2 REPLIES 2
Read only

Former Member
0 Likes
303

Well I should be more specific. I want to initialize the timestamp with the current timestamp value using GET TIME STAMP FIELD and adding the difference to the local time.

Read only

cmilkau
Participant
0 Likes
303

I had a similar issue, in my case I wanted to load domain texts for fixed value attributes.

It seems you cannot edit the constructor, but you can add a static factory method, and use "raise exception cx_example=>create( )" instead of "raise exception new" or "raise exception type"