View Source

<ac:macro ac:name="note"><ac:parameter ac:name="title">Under Construction</ac:parameter><ac:rich-text-body>
<p>This proposal is under construction and is not ready for review.</p></ac:rich-text-body></ac:macro>

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFDEV:Zend Proposal Zone Template}

{zone-data:component-name}
Zend_Debug
{zone-data}

{zone-data:proposer-list}
[My E-mail Address|mailto:mhujer@gmail.com]
{zone-data}

{zone-data:revision}
1.0 - 30 January 2008: Initial proposal
{zone-data}

{zone-data:overview}
Zend_Debug needs some enhancements such as formatted exception handler, error handler and timer.
{zone-data}

{zone-data:references}
* [dgx's Nette (Czech)|http://latrine.dgx.cz/ladenka-jak-se-vam-libi]
{zone-data}
{zone-data:requirements}
* Zend_Debug *will* show a formatted exception/error when it raises happens.
* The generated output *should* contain piece of code where the error/exception has appeared.
* Timer *should* work with milliseconds.
{zone-data}

{zone-data:dependencies}
* Zend_Exception
* Zend_Debug
{zone-data}

{zone-data:operation}
The error/exception handler may be initialized this way:
Zend_Debug::handleExceptions(true);
Zend_Debug::handleErrors(true);
{zone-data}

{zone-data:milestones}
* Milestone 1: Finalize proposal
* Milestone 2: Working prototype checked into the incubator supporting use cases #1, #2, ...
* Milestone 3: Working prototype checked into the incubator supporting use cases #3 and #4.
* Milestone 4: Unit tests exist, work, and are checked into SVN.
* Milestone 5: Initial documentation exists.

If a milestone is already done, begin the description with "\[DONE\]", like this:
* Milestone #: \[DONE\] Unit tests ...
{zone-data}

{zone-data:class-list}
* Zend_Debug_Exception
* Zend_Debug
{zone-data}

{zone-data:use-cases}
{composition-setup}

{deck:id=use-cases1}

{card:label=UC 1: simple usage}
{code:type=php}
//bootstrap
Zend_Debug::handleExceptions(true);
Zend_Debug::handleErrors(true);


//somewhere else
throw new Zend_Exception('Exception');

//will display rendered exception
... (see good use cases book)
{code}
{card}

{card:label=UC 2: Error controller}
{code:type=php}
if ($this->_request->getServer('HTTP_HOST') == 'localhost') {
Zend_Debug($this->exception);
}
{code}
{card}

{deck}
{zone-data}

{zone-data:skeletons}
{code:type=php}
class Zend_Debug {
//...
}

class Zend_Debug_Exception extends Zend_Exception {}
{code}

{card}
{deck}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>