Author: xavier
Date: 2010-01-12 13:56:08 +0100 (Tue, 12 Jan 2010)
New Revision: 26530
Modified:
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/createAction.php
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/indexAction.php
Log:
[sfDoctrineRestGeneratorPlugin]: formatted exception messages as XML
Modified:
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/createAction.php
===================================================================
---
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/createAction.php
2010-01-12 12:45:55 UTC (rev 26529)
+++
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/createAction.php
2010-01-12 12:56:08 UTC (rev 26530)
@@ -15,8 +15,10 @@
catch (Exception $e)
{
$this->getResponse()->setStatusCode(406);
- echo $e->getMessage();
- return sfView::NONE;
+ $error = array(array('message' => $e->getMessage()));
+ $this->xml = sfRestInflector::arrayToXml($error, 'error');
+ $this->setTemplate('index');
+ return sfView::SUCCESS;
}
$this->object = $this->createObject();
Modified:
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/indexAction.php
===================================================================
---
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/indexAction.php
2010-01-12 12:45:55 UTC (rev 26529)
+++
plugins/sfDoctrineRestGeneratorPlugin/trunk/data/generator/sfDoctrineRestGenerator/default/parts/indexAction.php
2010-01-12 12:56:08 UTC (rev 26530)
@@ -26,7 +26,9 @@
catch (Exception $e)
{
$this->getResponse()->setStatusCode(406);
- return sfView::NONE;
+ $error = array(array('message' => $e->getMessage()));
+ $this->xml = sfRestInflector::arrayToXml($error, 'error');
+ return sfView::SUCCESS;
}
$this->query($params);
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.