Problems with BESSELJ

View: New views
2 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Re: Problems with BESSELJ

by Regina Henschel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Eike,

Eike Rathke schrieb:

> Hi Regina,
>
> On Thursday, 2009-07-09 15:47:06 +0200, Regina Henschel wrote:
>
>>>> (3) I have tried to use the Message of the exception. But there I
>>>> fail  already in the syntax.
>>> The original exception's Message should be available as
>>> rWrapped.TargetException.Message
>> I fail before that place. I do not no, how to write the throw command. A  
>> simple
>>
>> throw ::com::sun::star::uno::RuntimeException("Konvergenzfehler");
>>
>> does not compile.
>
> Ah, no, there's no automatic conversion from string literals to
> OUString. For ASCII strings you may use the module's STRFROMASCII(s)
> that is defined in analysisdefs.hxx, so
> ...Exception(STRFROMASCII("convergence error")) should do.

I will test it after finishing the solution with the new exception.

>
> We'd prefer English messages, even if just for debugging/tracing
> purposes ;-)

Yes, I know; it was only German here in the mail.

The solution with the new exception works now. So I will first generate
the according patches.

kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Problems with BESSELJ

by Regina Henschel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Eike,

Eike Rathke schrieb:

> Hi Regina,
>
> On Thursday, 2009-07-09 15:47:06 +0200, Regina Henschel wrote:
>
>>>> (3) I have tried to use the Message of the exception. But there I
>>>> fail  already in the syntax.
>>> The original exception's Message should be available as
>>> rWrapped.TargetException.Message
>> I fail before that place. I do not no, how to write the throw command. A  
>> simple
>>
>> throw ::com::sun::star::uno::RuntimeException("Konvergenzfehler");
>>
>> does not compile.
>
> Ah, no, there's no automatic conversion from string literals to
> OUString. For ASCII strings you may use the module's STRFROMASCII(s)
> that is defined in analysisdefs.hxx, so
> ...Exception(STRFROMASCII("convergence error")) should do.

That does not work in that way. I have earlier tried with a const
OUString, which doesn't work too. But I have found my error now. You
need not only the parameter for Message, but the parameter for Context
too. So
...Exception(STRFROMASCII("convergence error"),NULL)
compiles.

On the other side, in addincol.cxx, I'm still not able to compare the
strings. I thought something like

     if (rWrapped.TargetException.Message.equals("convergence error"))

would work, but it doesn't compile. The version with first declaring
     const ::rtl::OUString sMyMessage =
::rtl::OUString::createFromAscii("convergence error");
and then using
     if (rWrapped.TargetException.Message.equals(sMyMessage))
doesn't compile too.

But because the solution with a new exception works, I'll not bother you.

kind regards
Regina




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

< Prev | 1 - 2 | Next >