[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] CAF : Exceptions


> Wondering if there are plans for some type of error handling into CAF.
>
> Such as, I like for my fuctions to return error codes and set template
> paramaters, such that my code can do stuff like this
>
> <tmpl_if db_insert_error>
>   Sorry, your thingy was not thingified
> </tmpl_if>
>
> That way the web guys have control over the wording of the errors, and
> makes multilingual stuff tres easy.

I've just started using Exception::Class at work and it is great!

But at the moment, I throw exceptions in my model classes and catch them
in the controller (manually adding the caught messages to the template).
I agree that some kind of glue here would be useful.

> Also, are there plans for buildin in internationalization hooks ?

I have very little experience with internationalization.  I'm open to
ideas.

Somet projects to look at for inspiration:

  * Apache::PageKit has a similar architecture to C::A and is
    very focussed on internationalization.

  * Petal (which is available from AnyTemplate) has several
    built-in hooks to automatically pull in language-specific
    templates.


Michael


-----------------------------------------------------------------------
Michael Graham <suppressed>

YAPC::NA 2005 Toronto - http://www.yapc.org/America/ - suppressed
-----------------------------------------------------------------------



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.