on 07-07-2015 12:24 AM
Can anyone please help me how would I stop PB application from terminating? e.g if we have the application open and in a screen, a field is not found, it would display message "null object reference found at line XXXX...." and the application would terminate.
Is there a way to maybe close just the screen(maybe a popup window) where termination happened and let the main window still open?
Did you try adding the
try..catch in the script?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This error indicates a scripting error because an object is referenced that does not or no longer exists, although there might be situations where you cannot be 100% certain an object will exist when you need to access or open it.
One way is to add script in the systemerror event like following example
if error.Number = 22 and error.objectevent = "wf_opensheet" then
MessageBox("OpenSheet Error", &
"Unknown Window: " + Mid(error.text, 21)) //special case for sheet manager.
else
MessageBox("SystemError", &
"Number: " + string(error.number) + "~r~n" &
+ "Text: " + error.text + "~r~n" &
+ "Line: " + string(error.line) + "~r~n" &
+ "Event: " + error.objectevent + "~r~n" &
+ "Object: " + error.object + "~r~n" &
+ "WindowMenu: " + error.windowmenu)
end if
Or if there are places where it is known in advance that the operation might fail , then you can put the statement sequence within a try catch statement.
Lastely this is not the right forum to ask such questions, a better place would be the PowerBuilder Developer Center, which has a much larger number of developers as members.
http://scn.sap.com/community/developer-center/powerbuilder
Ben
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.