You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Christian Egli <ch...@wyona.com> on 2003/08/14 19:18:42 UTC

Publishing Exception

Hi

The publishing screen in the default publication currently gives you a
nasty Exception if you publish a document where its parent document
hasn't been published. This is because it cannot find the parent node
in the live tree. 

This is very confusing for the user (and users have told me that
publishing doesn't work for that reason).

In order to avoid this confusion there are several solutions:

1. Warn the user in the publish screen, i.e. before publishing check
   the live site tree for the parent id. 

   Since the publish screen is generic this has the drawback that it
   adds unecessary code for the publications which do not have a site
   tree.

2. Catch the error and present a nice error message. This is a little
   bit tricky and would necessitate the following:

   a) The site tree would have to raise a special exception in the
      case of a missing parent node.
   b) In the sitemap a yet to build ExceptionSeletor would have to
      grab the exception out of its surounding exception, i.e. it
      would have to open the ExecutionException, the BuildException,
      and the PublishingException to finally find the
      ParentNodeNotFoundException. Then the handle-errors section
      could select on the exception and present an appropriate error
      screen.

What do you think?

-- 
Christian Egli       christian.egli@wyona.com   +41 1 272 9161
                     Wyona AG, Hardstrasse 219, CH-8005 Zurich
Open Source CMS      http://www.wyona.org http://www.wyona.com 

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


Re: Publishing Exception

Posted by Michael Wechner <mi...@apache.org>.
Christian Egli wrote:
> Michael Wechner <mi...@apache.org> writes:
> 

<snip/>

> 
> 
> Luckily the existing ExceptionSelector can already "unroll"
> Exceptions, i.e. check for Exceptions which are embeded in others. It
> seems that it's just a matter of configuring it properly. Working on
> it.

great

Looking forward to much better "exception" screens.

Thanks

Michael
> 



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


Re: Publishing Exception

Posted by Christian Egli <ch...@wyona.com>.
Michael Wechner <mi...@apache.org> writes:

> > 2. Catch the error and present a nice error message. This is a little
> >    bit tricky and would necessitate the following:
> >    a) The site tree would have to raise a special exception in the
> >       case of a missing parent node.
> 
> e.g. NoParentNodeException

I created a ParentNodeNotFoundException which is derived from
PublishingException.

> >    b) In the sitemap a yet to build ExceptionSeletor would have to
> >       grab the exception out of its surounding exception, i.e. it
> >       would have to open the ExecutionException, the BuildException,
> >       and the PublishingException to finally find the
> >       ParentNodeNotFoundException. Then the handle-errors section
> >       could select on the exception and present an appropriate error
> >       screen.
> 
> +1 (I guess we would have to write our own ExceptionSelector to "find"
> the actual Exception)
> 
> Since all tasks are to be done as Ant Tasks we would need such an
> improved "exception" handling anyway. Publishing is just one usecase.

Luckily the existing ExceptionSelector can already "unroll"
Exceptions, i.e. check for Exceptions which are embeded in others. It
seems that it's just a matter of configuring it properly. Working on
it.

-- 
Christian Egli       christian.egli@wyona.com   +41 1 272 9161
                     Wyona AG, Hardstrasse 219, CH-8005 Zurich
Open Source CMS      http://www.wyona.org http://www.wyona.com 

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


Re: Publishing Exception

Posted by Michael Wechner <mi...@apache.org>.
Christian Egli wrote:
> Hi
> 
> The publishing screen in the default publication currently gives you a
> nasty Exception if you publish a document where its parent document
> hasn't been published. This is because it cannot find the parent node
> in the live tree. 
> 
> This is very confusing for the user (and users have told me that
> publishing doesn't work for that reason).
> 
> In order to avoid this confusion there are several solutions:
> 
> 1. Warn the user in the publish screen, i.e. before publishing check
>    the live site tree for the parent id. 
> 
>    Since the publish screen is generic this has the drawback that it
>    adds unecessary code for the publications which do not have a site
>    tree.

-1

> 
> 2. Catch the error and present a nice error message. This is a little
>    bit tricky and would necessitate the following:
> 
>    a) The site tree would have to raise a special exception in the
>       case of a missing parent node.

e.g. NoParentNodeException

>    b) In the sitemap a yet to build ExceptionSeletor would have to
>       grab the exception out of its surounding exception, i.e. it
>       would have to open the ExecutionException, the BuildException,
>       and the PublishingException to finally find the
>       ParentNodeNotFoundException. Then the handle-errors section
>       could select on the exception and present an appropriate error
>       screen.

+1 (I guess we would have to write our own ExceptionSelector to "find" 
the actual Exception)

Since all tasks are to be done as Ant Tasks we would need such an 
improved "exception" handling anyway. Publishing is just one usecase.


Thanks

Michael

> 
> What do you think?
> 



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