V4RB2 bug 648 -> REALBASIC BUG

Sims, John ayu8 at cdc.gov
Wed Apr 27 08:22:14 CDT 2005


> 
> Hi Olivier,
> 
> I saw your posts here and in the RB list archives.  I think 
> the problem is you seem to be combining the 2 different ways 
> of dealing with exceptions in RB.  If you want to use the 
> "try" block, think of it as a "try-catch" block and that will 
> help keep it straight in your head.  The "try-catch" block 
> looks like this...
> 
> Try
> {your code goes here}
> Catch ex as [whatever type of exception you wish to trap]
> {the code here is what you want to do should you encounter an 
> exception of the type you are trapping for} Finally 
> (optional) {this section basically allows you to do any 
> clean-up if necessary as this code will execute even if you 
> encounter an exception} End Try
> 
> As you see, the "Exception" keyword is not used in a 
> try-catch block. The "Exception" keyword is the other way of 
> trapping exceptions.  It looks like this...
> 
> Sub [or Function]
> {your code goes here.  Make sure you return an appropriate 
> value if the method is a function}
> 
> Exception err
> {the code here is what you want to do should you encounter an 
> exception}
> 
> End Sub [or Function]
> 
> I hope this helps and let us know how making these changes 
> affects you test app :-)
> 
> -John

Somehow, the format of my e-mail got a little goofy.  Just for clarity
sake...

Try



Catch ex as [type of exception]



Finally



End Try

Hopefully, this will look better and help clarify my last post if others
are seeing the message the same as I :-P

-John


More information about the Valentina mailing list