- Aron Cox
- PowerBuilder
- Wednesday, 15 January 2020 02:32 PM UTC
Powerbuilder 2017 R2.
I want to catch an OLERuntimeException when my PowerBuilder code tries to call a function on an ActiveX control that hasn't been installed on the machine in question.
I put a TRY CATCH around the call, and in the PB IDE an OLERunTimeException error message is displayed, but in a build the message in my CATCH statement is displayed. I can live with that.
At that point I want to return something like FALSE to the caller and carry on, but then, as it says in the help file, the error bubbles up to the System Error event.
Help File:
"The exception then continues to unwind the call stack to any outer nested try-catch blocks. If there are no outer nested blocks, the SystemError event on the Application object is fired."
How do I stop the error once I have dome whatever I want in the very first Catch statement? Maybe I don't want it to bubble up and I just want to return some kind of failure code to the caller.
I feel like I must be missing something really simple, i do this all the time in .NET code, by literally not rethrowing the error???
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.