Try/Exception handling

From: Greg Edwards <"Greg>
Date: Sat, 1 Sep 2001 16:14:02 -0700

In C++/Java you can "try" some code, knowing that it might fail for various
reasons, and then recover (via Exception handling) if something does go
wrong while executing the code.

Has anyone figured out any way to do this with BB?

I'm using BB1.3 to develop a commercial "recording application" that must
never fail (even if something goes wrong) while it is running. However, it
interacts with some other windows programs via COM that WILL fail (quite
often). My program needs to gracefully handle these situations and keep
going.

I've found that if you need to have some code always called (even if it
fails sometimes) that you can create a Service.Action that will 1) register
to be called again 2) calls the code you want to call via Meta or
Dialog.Call (Haven't really figured out how to use Meta effectively, which
is sad because it seems so powerful). In the event that the code fails, it
a) creates a trap window, then b) since the Service.Action has already
registered itself to be called again, it still gets called despite the trap.

I'm not that wild about this implementation of mine... I don't like having
the Trap windows always popping up (I wish I could have my own trap handler
that didn't pop up the window), and also I wish I had a more robust
Try/Exception handling under BB.

Any thoughts or experiences from anyone?

-Greg

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at

   owner-blackbox{([at]})nowhere.xy
Received on Sat Sep 01 2001 - 23:14:02 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:43 UTC