Re: package proposals: Error_Raise and Error_Handler

From: Date: Mon, 18 Aug 2003 14:28:28 +0000
Subject: Re: package proposals: Error_Raise and Error_Handler
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19989@lists.php.net to get a copy of this message
Hi Arnaud, Yes, the line 78 should read $err->getMessage(ERROR_RAISE_HTML), I'll fix that and upload a new one in a few hours. Thanks for the catch :) Greg LIMBOURG Arnaud wrote:
Hi greg, I'm sending this offlist as i don't know if there is an error in the example or it's just me On the error_raise tutorial, in the last example You write function getErrorMsg($code, $args, $state) Then Error_Raise::initialize("MyTemplatePackage",
72        array('MyTemplatePackage', 'getErrorMsg'));
73    Error_Raise::setContextGrabber('MyTemplatePackage',
74        array(&$obj, 'getTemplateContext'));
75    // ...
76    $err = MyTemplatePackage_Raise::notice(MYTEMPLATEPACKAGE_ERROR_MISSING_TAG,
77        array('tag' => '{/hooper}'));
78    echo $obj->getMessage(ERROR_RAISE_HTML);
Where does the getMessage come from, shouldn't it be getErrorMsg ? I did not see any getMessage in Error_Raise class so i am a bit confused. I'm trying to use it at work, to learn first, and because it seems like it will have the power i need to display nice errors to the end-user ;) Arnaud.


« previous php.pear.dev (#19989) next »