cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upayavira">
Subject Re: New error handling
Date Wed, 16 Apr 2003 13:28:35 GMT
> >Is there a way that I can find out that a page has failed (either
> >through an exception or an error code) so that I can prevent the CLI
> >from just accept the default page served back?

> I would recommend:
> 1. Implement setStatus() in AbstractCommandLineEnvironment 
> (implementation is empty right now)
> 2. Add getStatus() to the AbstractCommandLineEnvironment
> 3. Test getStatus() in the CLI crawling code.
> 4. Test how it works and fix the broken link :)

So you're saying that the treeprocessor (or whatever) will call the setStatus() method 
on the environment to tell it whether page generation succeeded. Then all I need to 
do is store that within the environment and use it. Is this correct?

Similarly, based upon comments from Nicola Ken ages ago:

>>In the Environment there is
>>     boolean isResponseModified(long lastModified);
>>     void setResponseIsNotModified();
>>But it's never implemented. In AbstractEnvironment:
>>     public boolean isResponseModified(long lastModified) {
>>         return true; // always modified
>>     }
>>     public void setResponseIsNotModified() {
>>         // does nothing
>>     }

Similarly, the setResponseIsNotModified() will be called on the current environment if 
a response was read from the cache. At present, this method does nothing. However, 
if I get the environment to store something based upon this, then the CLI can know 
whether or not to bother saving the page?

Thanks for this.

Regards, Upayavira


View raw message