You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ellis Pritchard <el...@nukinetics.com> on 2005/01/27 14:51:54 UTC

undefined exception object in flow script try {} catch {} block

Hi,

Using Cocoon 2.1.6, I don't seem to be getting the exception object 
passed through when catching an exception in flowscript; I've reduced it 
to the most simple case:

function login() {
    try {
        throw "bang";
    } catch (x) {
        cocoon.logger.debug(x);
    }
}

I get the error message 'The undefined value has no properties.', and 
sure enough, the Flow debugger says that x is undefined (actually it 
doesn't even exist).

Any ideas?

Ellis.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: undefined exception object in flow script try {} catch {} block

Posted by Ellis Pritchard <el...@nukinetics.com>.
Ok! Great first post; it was the logger causing the problem; it should 
have been:

cocoon.log.debug(x)

!!

Ellis.


Ellis Pritchard wrote:

> Hi,
>
> Using Cocoon 2.1.6, I don't seem to be getting the exception object 
> passed through when catching an exception in flowscript; I've reduced 
> it to the most simple case:
>
> function login() {
>    try {
>        throw "bang";
>    } catch (x) {
>        cocoon.logger.debug(x);
>    }
> }
>
> I get the error message 'The undefined value has no properties.', and 
> sure enough, the Flow debugger says that x is undefined (actually it 
> doesn't even exist).
>
> Any ideas?
>
> Ellis.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: undefined exception object in flow script try {} catch {} block

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Ellis Pritchard wrote:
> Hi,
> 
> Using Cocoon 2.1.6, I don't seem to be getting the exception object 
> passed through when catching an exception in flowscript; I've reduced it 
> to the most simple case:
> 
> function login() {
>    try {
>        throw "bang";
>    } catch (x) {
>        cocoon.logger.debug(x);
>    }
> }
> 
> I get the error message 'The undefined value has no properties.', and 
> sure enough, the Flow debugger says that x is undefined (actually it 
> doesn't even exist).
cocoon.log.debug()

http://cocoon.apache.org/2.1/userdocs/flow/api.html#Log+Object
-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org