Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How and where do you trap errors in PB7 (ie, GetLastError())

Status
Not open for further replies.

astephens

Programmer
Dec 8, 2010
2
0
0
US
Is there any way to prevent the wonderful "Sybase has encountered an error...." window from displaying and my app from crashing? I have code in my systemerror event to go through the closing process in order to close files but when the error forces the app to shut down that code does not get run. Please help!
 
I have, and that usually does clear up the error. I was wondering if there was any way to prevent it from displaying so that I could exit cleanly. I know you can call the SetErrorMode to supress window errors and you can use GetLastError, I'm just not sure where to put the code or if there's a better way to handle it. I was thinking of using the "other" event on my main window and display only certain errors? I know 8.0 has better error trapping ability but my higher-ups won't budge on moving forward so I'm stuck trying to do what is already partially available.
 
Your app should really do pass through the systemerror event,
and there shouldn't be any system message once you have uncommented code in the systemerror event.
See in the application object whether your using some custom error object assigned to the errorobject variable.
When you put a stop in the system error event, you end up there? If not it might be a diferent type of error like 'datawindow error' or a datawindow dberror event.

What error exactly are you receiving ?

Miguel

(did you optimize the libraries too a part from regenerating them??)


regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top