[PHPTAL] How i use meaningful errors?
Tjerk Meesters
tjerk.meesters at gmail.com
Sat Dec 17 17:51:41 CET 2005
Hey Stefan,
This is a PHP thing more than anything else: try print_r($e) instead of
echo $e.
For reference on exceptions:
http://sg.php.net/exceptions
Cheers,
Jack
Stefan Jacomeit wrote:
>hi,
>
>when i have an error in template, i get mostly an error in form
>"ObjectID#275" or same.
>
>i use follow try/catch-block in php-files:
>try {
> $tr = new PHPTAL_GetTextTranslator();
> $tr->setLanguage($locale,$locale2);
> $tr->addDomain("index", LOCALE);
> $tr->useDomain("index");
> $tpl = new PHPTAL($page);
> $tpl->setTranslator($tr);
> echo $tpl->execute();
>} catch (Exception $e){
> echo $e;
>}
>
>How i can get a meaningful text, where the error located?
>thanks
>
>
>
>_______________________________________________
>PHPTAL mailing list
>PHPTAL at lists.motion-twin.com
>http://lists.motion-twin.com/mailman/listinfo/phptal
>
>
>
More information about the PHPTAL
mailing list