V4RB2 bug 648 -> REALBASIC BUG
Olivier
vidal_olivier at yahoo.fr
Wed Apr 27 14:28:19 CDT 2005
thank you John for your answer.
I made an error of type by sending my e-mail to RB !
The test is indeed:
dim st(500000)
for i=0 to 500000
st(i)="jhljhljhljhljhljhljhljhljhljhjhkjhzzzzzzz"
next i
for i=500001 to 500500
try
st(i)="jhljhljhljhljhljhljhljhljhljhjhkjhzzzzzzz"
catch err as outOfBoundsException
end try
next i
It is correct?
Olivier
Le 27 avr. 05, à 14:22, Sims, John a écrit :
>>
>> 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
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
More information about the Valentina
mailing list