Skip to Content
0
Former Member
Jan 22, 2010 at 03:21 PM

Any way to catch exceptions from asynchronous call that short dumps?

160 Views

Hi,

We have a requirement for a program that we know will occasionally short dump under normal conditions. We want to use an asynchronous call to let it plow ahead. To that end I've created a test program that calls a divide by zero func that short dumps. It tests fine because it proceeds afterward. Better yet would be a way to capture some information from the function where the dump happens and raise it to the calling program. Any ideas?

Thanks,

Doug

Example:

REPORT ZJUNK2

data: junkdone TYPE c VALUE space,

write: / 'before'.

CALL FUNCTION 'ZJUNK2'

STARTING NEW TASK 'z_junktask'

PERFORMING junk ON END OF TASK

EXCEPTIONS

communication_failure = 1

system_failure = 2

other_exception = 3.

  • Receive remaining asynchronous replies

wait until junkdone = 'X'.

write: / 'after'.

FORM junk USING taskname.

RECEIVE RESULTS FROM FUNCTION 'ZJUNK2'

EXCEPTIONS

communication_failure = 1

system_failure = 2

other_exception = 3.

junkdone = 'X'.

ENDFORM.

FUNCTION ZJUNK2.

*"----


""Local Interface:

*"----


data: i type i.

i = 1 / 0.

ENDFUNCTION.