Development

Changeset 11417

You must first sign up to be able to contribute.

Changeset 11417

Show
Ignore:
Timestamp:
09/09/08 20:32:43 (5 years ago)
Author:
Kris.Wallsmith
Message:

sfExceptionFormatsPlugin: Added svn:ignore props to test project, released 1.0.0.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfExceptionFormatsPlugin/trunk/LICENSE

    r11415 r11417  
     1Copyright (c) 2008 Kris Wallsmith 
     2 
     3Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 
     4 
     5The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 
     6 
     7THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
  • plugins/sfExceptionFormatsPlugin/trunk/README

    r11415 r11417  
     1The `sfExceptionFormatsPlugin` extends symfony 1.1's integration of multiple request formats to include exception and error 500 pages. 
     2 
     3For example, if a request that includes a `sf_method` parameter with the value of `xml` throws an exception, the plugin will output the following response: 
     4 
     5    [xml] 
     6    <?xml version="1.0" encoding="UTF-8"?> 
     7    <error code="500" message="Internal Server Error"/> 
     8 
     9Very little information is betrayed here. If you request the same URL using a debug controller, you will see a bit more: 
     10 
     11    [xml] 
     12    <?xml version="1.0" encoding="UTF-8"?> 
     13    <error code="500" message="Internal Server Error"> 
     14      <debug exception="sfException" message="Something unexpected happened" /> 
     15    </error> 
     16 
     17Customizing the error responses 
     18=============================== 
     19 
     20You can easily customize how exceptions for each format are rendered by adding a template file to your project or application's config directory. For example, placing a `exception.json.php` file in `/config` will customize how JSON exceptions are rendered when debug mode is on. An `error_500.json.php` file in the same directory would render when debug mode is off. 
     21 
     22The offending exception object is available in all custom templates as `$exception`. 
  • plugins/sfExceptionFormatsPlugin/trunk/lib/sfExceptionFormatsToolkit.class.php

    r11415 r11417  
    1717   *  
    1818   * @return  boolean 
    19    *  
    20    * @see     sfException::outputStackTrace() 
    2119   */ 
    2220  static public function listenForThrowException(sfEvent $event) 
  • plugins/sfExceptionFormatsPlugin/trunk/package.xml

    r11415 r11417  
     1<?xml version="1.0" encoding="UTF-8"?> 
     2<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.4.1" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> 
     3  <name>sfExceptionFormatsPlugin</name> 
     4  <channel>pear.symfony-project.com</channel> 
     5  <summary>Renders exceptions as the appropriate content type.</summary> 
     6  <description>Renders exceptions as the appropriate content type.</description> 
     7  <lead> 
     8    <name>Kris Wallsmith</name> 
     9    <user>Kris.Wallsmith</user> 
     10    <email>kris.wallsmith@gmail.com</email> 
     11    <active>yes</active> 
     12  </lead> 
     13  <date>2008-09-09</date> 
     14  <version> 
     15    <release>1.0.0</release> 
     16    <api>1.0.0</api> 
     17  </version> 
     18  <stability> 
     19    <release>stable</release> 
     20    <api>stable</api> 
     21  </stability> 
     22  <license uri="http://www.symfony-project.com/license">MIT license</license> 
     23  <notes>-</notes> 
     24  <contents> 
     25    <dir name="/"> 
     26      <dir name="config"> 
     27        <file role="data" name="app.yml"/> 
     28        <file role="data" name="config.php"/> 
     29        <file role="data" name="error_500.atom.php"/> 
     30        <file role="data" name="error_500.css.php"/> 
     31        <file role="data" name="error_500.html.php"/> 
     32        <file role="data" name="error_500.js.php"/> 
     33        <file role="data" name="error_500.json.php"/> 
     34        <file role="data" name="error_500.rdf.php"/> 
     35        <file role="data" name="error_500.txt.php"/> 
     36        <file role="data" name="error_500.xml.php"/> 
     37        <file role="data" name="exception.atom.php"/> 
     38        <file role="data" name="exception.css.php"/> 
     39        <file role="data" name="exception.html.php"/> 
     40        <file role="data" name="exception.js.php"/> 
     41        <file role="data" name="exception.json.php"/> 
     42        <file role="data" name="exception.rdf.php"/> 
     43        <file role="data" name="exception.txt.php"/> 
     44        <file role="data" name="exception.xml.php"/> 
     45      </dir> 
     46      <dir name="lib"> 
     47        <file role="data" name="sfExceptionFormatsException.class.php"/> 
     48        <file role="data" name="sfExceptionFormatsToolkit.class.php"/> 
     49      </dir> 
     50      <file role="data" name="LICENSE"/> 
     51      <file role="data" name="README"/> 
     52    </dir> 
     53  </contents> 
     54  <dependencies> 
     55    <required> 
     56      <php> 
     57        <min>5.1.0</min> 
     58      </php> 
     59      <pearinstaller> 
     60        <min>1.4.1</min> 
     61      </pearinstaller> 
     62      <package> 
     63        <name>symfony</name> 
     64        <channel>pear.symfony-project.com</channel> 
     65        <min>1.1.0</min> 
     66        <max>1.2.0</max> 
     67        <exclude>1.2.0</exclude> 
     68      </package> 
     69    </required> 
     70  </dependencies> 
     71  <phprelease> 
     72 </phprelease> 
     73  <changelog> 
     74    <release> 
     75      <version> 
     76        <release>1.0.0</release> 
     77        <api>1.0.0</api> 
     78      </version> 
     79      <stability> 
     80        <release>stable</release> 
     81        <api>stable</api> 
     82      </stability> 
     83      <license>MIT</license> 
     84      <date>2008-09-09</date> 
     85      <notes> 
     86        Initial public release 
     87      </notes> 
     88    </release> 
     89  </changelog> 
     90</package> 
  • plugins/sfExceptionFormatsPlugin/trunk/test/fixtures/project/cache

    • Property svn:ignore set to
      *
  • plugins/sfExceptionFormatsPlugin/trunk/test/fixtures/project/log

    • Property svn:ignore set to
      *
  • plugins/sfExceptionFormatsPlugin/trunk/test/fixtures/project/web/uploads

    • Property svn:ignore set to
      *