11.4 appserver - I thought you could throw an exception from

Posted by Darren Parr on 11-Oct-2014 04:20

Hi

Ive just written some code with CATCH blocks etc. Its an internal procedure in a persistent procedure running on an appserver. Ive got a message in the catch with shows the error and e:ReturnValue as its an apperror.


The throw is there. On the client it returns and error-status:error is false but we have a return-value. Is this correct?


Regards


Darren

All Replies

Posted by jmls on 11-Oct-2014 04:25

did you "undo, throw new AppError("somemessage",SomeValue)" ?

if just undo throw new AppError("message") then that may be your problem

On 11 October 2014 10:21, DarrenP wrote:
> 11.4 appserver - I thought you could throw an exception from there and have
> it caught on the client
> Thread created by DarrenP
>
> Hi
>
> Ive just written some code with CATCH blocks etc. Its an internal procedure
> in a persistent procedure running on an appserver. Ive got a message in the
> catch with shows the error and e:ReturnValue as its an apperror.
>
>
> The throw is there. On the client it returns and error-status:error is false
> but we have a return-value. Is this correct?
>
>
> Regards
>
>
> Darren
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.



--
Julian Lyndon-Smith
IT Director,
dot.r
http://www.dotr.com

Posted by Darren Parr on 11-Oct-2014 11:03

It makes no difference whatsoever how I create the apperror. The only way I can get this to work is to catch the error and its a system error then return error e:GetMessage(1) or if its an apperror return error e:returnvalue

I can't believe this doesn't work. It was one of the stated features of 11.4. Guess they were too busy sorting out table partitioning... :-)

Posted by Mike Fechner on 11-Oct-2014 12:01

Throwing errors back from the Appserver works fine for me.

When you run the same code without AppServer (using the session handle as the server handle) does that make a difference? If your error is lost that way too your problem is with ON ERROR UNDO, THROW and not a problem with the error object serialization.

Von meinem Windows Phone gesendet

Von: DarrenP
Gesendet: ‎11.‎10.‎2014 18:03
An: TU.OE.General@community.progress.com
Betreff: RE: [Technical Users - OE General] 11.4 appserver - I thought you could throw an exception from there and have it caught on the client

Reply by DarrenP

It makes no difference whatsoever how I create the apperror. The only way I can get this to work is to catch the error and its a system error then return error e:GetMessage(1) or if its an apperror return error e:returnvalue

I can't believe this doesn't work. It was one of the stated features of 11.4. Guess they were too busy sorting out table partitioning... :-)

Stop receiving emails on this subject.

Flag this post as spam/abuse.

This thread is closed