List Info

Thread: Re: exceptions in Basic




Re: exceptions in Basic
user name
2007-04-10 05:44:44
Mathias Bauer wrote:
> Frank Schönheit - Sun Microsystems Germany wrote:
> 
>> Hi Andreas,
>>
>>> Great, this would solve the problem. Maybe we
then should
>>> think about a cheap solution, at least for now.
E.g. a spe-
>>> cial object named CurrentUnoException or
something like
>>> that could be provided by Basic in case an UNO
exception
>>> error occurs containing the Exception object.
>> +1
>>
>>> This would
>>> match with the err variable concept and we
wouldn't have
>>> to implement the complete try/catch syntax that
isn't
>>> Basic like anyway.
>> Well ... how is "Basic like" defined? By
the Basic originally invented
>> some decades ago, by one of the zillions of Basic
dialects out there, or
>>  by what we me make of it? I certainly vote for the
latter ...
>>
>> We also need, IMO, a "throw". (I think
Mathias will agree to me here.
>> AFAIK, his repeated argueing for exception-less UNO
API originates from
>> his team's experiences with existing API which
could not be used in
>> Basic, since this would have required the script to
throw an exception.)
>> If we would decide to have it, *not* having
try/catch would look ...
>> senseless.
> 
> Yes, that's one point. The other point is a missing
real "catch"
> support. The "On error goto" is not
sufficient as it doesn't allow to
> specify where the program should continue in case an
exception got
> caught (except by flooding your code with jump labels
and your
> "exception handlers" with gazillions of Goto
statement).
> 
> If we had a usable exception support in OOo Basic we
still can have
> problems with other languages like e.g. VBA but that
might be bearable.
> 
> I don't know wether our Scripting Framework and the
possible scripting
> languages using it support exceptions. Andreas should
know better.

at least JAVA macros work as expected with exceptions 

Juergen

> 
> Ciao,
> Mathias
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: interface-discuss-unsubscribeopenoffice.org
For additional commands, e-mail: interface-discuss-helpopenoffice.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )