cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <obill...@jouve.fr>
Subject Re: how to avoid 'generator already set' error in flowscript loop ? RE POST
Date Tue, 27 Jul 2004 07:34:02 GMT
Did you try the javascript debugger ?
You should be able to trace the execution flow, look at the variables 
values and test conditions.

--
Olivier

H.vanderLinden@MI.unimaas.nl wrote:
> Guys, 
> 
> thanks for thinking along, but what I'd really like to do is:
> 
> myFunction() {
> 	success = false;
> 	errmsg = "";
> 	while (!success) {
> 		try {
> 			[something that also displays errmsg]
> 			[check and throw error if necessary]
> 			success = true;
> 		}
> 		catch (error) {
> 			errmsg = "some error message"
> 			success = false;
> 		}
> 	}
> 	cocoon.sendPage([result]);
> }
> 
> rather than:
> 
> 
>>>myFunction(){
>>>    try{
>>>        [something]
>>>    }
>>>    catch(error){
>>>        cocoon.sendPage([error message]);
>>>        return;
>>>    }
>>>    cocoon.sendPage([result]);
>>>}
> 
> 
> so basically I want to redisplay the page with an error message on it until
> the user has done everything right.
> 
> Bye and thanks, Helma


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


Mime
View raw message