[api-dev] throw exception from OOo Basic

2006-09-29 Thread Knut Olav Bøhmer
Hi, How can I throw an exception from openoffice.org Basic? I'm trying to prevent a mailmerge document from closing with a CloseVetoException. So far I have this code. Sub RegisterListener oListener = CreateUnoListener( DocumentListener_, com.sun.star.document.XEventListener )

Re: [api-dev] throw exception from OOo Basic

2006-09-29 Thread Kent Gibson
All of this I found in the Basic Programmer's Guide I've never actually done it but it should go something like this: Sub Test On Error Goto ErrorHandler ' ... undertake task during which an error may occur Exit Sub ErrorHandler: ' ... individual code for

Re: [api-dev] throw exception from OOo Basic

2006-09-29 Thread Knut Olav Bøhmer
On 9/29/06, Kent Gibson [EMAIL PROTECTED] wrote: All of this I found in the Basic Programmer's Guide I've never actually done it but it should go something like this: Sub Test On Error Goto ErrorHandler ' ... undertake task during which an error may occur Exit Sub

Re: [api-dev] throw exception from OOo Basic

2006-09-29 Thread Marc Santhoff
Am Freitag, den 29.09.2006, 13:10 +0200 schrieb Knut Olav Bøhmer: Hi, How can I throw an exception from openoffice.org Basic? You can't. I'm trying to prevent a mailmerge document from closing with a CloseVetoException. So far I have this code. But this should be possible. Have a look at

Re: [api-dev] throw exception from OOo Basic

2006-09-29 Thread Mathias Bauer
Knut Olav Bøhmer wrote: Hi, How can I throw an exception from openoffice.org Basic? You can't. Basic does not support exceptions. For the case of close prevention we introduced a new service in OOo2.0.3 that takes over the job for you and deals with the exceptions. Currently I don't have

Re: [api-dev] throw exception from OOo Basic

2006-09-29 Thread Laurent Godard
Hi Mathias For the case of close prevention we introduced a new service in OOo2.0.3 that takes over the job for you and deals with the exceptions. Currently I don't have some basic code at hand, only some C++ code using constructors that needs to be translated first. Will see if I can find some