I get that PB can catch its own internal errors via DDT with the ON ERROR and set the Error number, but does SDK have an equivalent? (I know I can check GetLastError after every SDK call, but was looking to see if I could somehow ON SdkERROR goto sort of thing)
I am working on a error handler to at least log (if not correct) errors that I may have, and can not find, or did not think of.
SDK also has RaiseException and the ability to add your own exception handler, but to my knowledge (still reading the docs) that would be more for GPF's or some unavoidable crash (like corrupting memory)
Since its a learning concept and mixing SDK and DDT (in some cases one should NOT do) I am looking at somehow doing a ON ERROR goto concept via my SetLastError, but my only guess is to SETLASTERROR, and then GETLASTERROR and then pass to a function to see if there was an error?
I would hate to have to check GetLastError after every SDK call, but if that is the only way, then I can live with that.

I am working on a error handler to at least log (if not correct) errors that I may have, and can not find, or did not think of.
SDK also has RaiseException and the ability to add your own exception handler, but to my knowledge (still reading the docs) that would be more for GPF's or some unavoidable crash (like corrupting memory)
Since its a learning concept and mixing SDK and DDT (in some cases one should NOT do) I am looking at somehow doing a ON ERROR goto concept via my SetLastError, but my only guess is to SETLASTERROR, and then GETLASTERROR and then pass to a function to see if there was an error?
I would hate to have to check GetLastError after every SDK call, but if that is the only way, then I can live with that.


Comment