D
Dominique
Guest
I'm working with Progress-4GL Release 11.6, using appBuilder and procedure editor.
I just forgot to write a procedure, causing my application to "crash" (at least, that's how it looks like it). Obviously, when my application "crashed", I didn't know that it was caused by a missing procedure, so I started experimenting with exception handling, with following results:
This is working:
This means: the situation where a wrong conversion is done (a typical programming problem), the exception is catched and the corresponding information is shown on screen.
However, this one seems not to work:
For your information, the
None of those seems to work (the code compiled, but didn't catch the problem).
Does anybody know how to catch such kind of problem?
Continue reading...
I just forgot to write a procedure, causing my application to "crash" (at least, that's how it looks like it). Obviously, when my application "crashed", I didn't know that it was caused by a missing procedure, so I started experimenting with exception handling, with following results:
This is working:
Code:
SESSION:ERROR-STACK-TRACE = TRUE. // in order to see the callstack
DO ON ERROR UNDO, THROW:
MESSAGE "This is nonsense: [" INT("blabla") "]" VIEW-AS ALERT-BOX.
CATCH eAnyError AS Progress.Lang.Error:
MESSAGE
"Error Number:~t" eAnyError:GetMessageNum(1) "~n"
"Error Text:~t" eAnyError:GetMessage(1) "~n"
"Callstack:~~t" eAnyError:CallStack
VIEW-AS ALERT-BOX BUTTONS OK TITLE "Error processing in the CATCH-clause".
END CATCH.
END.
This means: the situation where a wrong conversion is done (a typical programming problem), the exception is catched and the corresponding information is shown on screen.
However, this one seems not to work:
Code:
DO ON ERROR UNDO, THROW:
RUN I-do-not-exist.
CATCH eAnyAppError AS Progress.Lang.<xxx>Error:
MESSAGE
"Error Number:~t" eAny<xxx>Error:GetMessageNum(1) "~n"
"Error Text:~t" eAny<xxx>Error:GetMessage(1) "~n"
"Callstack:~~t" eAny<xxx>Error:CallStack
VIEW-AS ALERT-BOX BUTTONS OK TITLE "Error processing in the next CATCH-clause".
END CATCH.
END.
For your information, the
Progress.Lang.<xxx>Error
entry means that I've tried for the following cases:Progress.Lang.Error
Progress.Lang.ProError
Progress.Lang.AppError
None of those seems to work (the code compiled, but didn't catch the problem).
Does anybody know how to catch such kind of problem?
Continue reading...