|
Revision 8319, 2.0 kB
(checked in by FabianLange, 5 years ago)
|
added some more information to non symfony exceptions. closes #2864
|
- Property svn:mime-type set to
text/x-php
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id Rev Date
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
class sfFrontWebController extends sfWebController |
|---|
| 24 |
{ |
|---|
| 25 |
|
|---|
| 26 |
* Dispatches a request. |
|---|
| 27 |
* |
|---|
| 28 |
* This will determine which module and action to use by request parameters specified by the user. |
|---|
| 29 |
*/ |
|---|
| 30 |
public function dispatch() |
|---|
| 31 |
{ |
|---|
| 32 |
try |
|---|
| 33 |
{ |
|---|
| 34 |
if (sfConfig::get('sf_logging_enabled')) |
|---|
| 35 |
{ |
|---|
| 36 |
$this->getContext()->getLogger()->info('{sfController} dispatch request'); |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
sfFilter::$filterCalled = array(); |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
$request = $this->getContext()->getRequest(); |
|---|
| 44 |
$moduleName = $request->getParameter('module'); |
|---|
| 45 |
$actionName = $request->getParameter('action'); |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
$this->forward($moduleName, $actionName); |
|---|
| 49 |
} |
|---|
| 50 |
catch (sfException $e) |
|---|
| 51 |
{ |
|---|
| 52 |
if (sfConfig::get('sf_test')) |
|---|
| 53 |
{ |
|---|
| 54 |
throw $e; |
|---|
| 55 |
} |
|---|
| 56 |
|
|---|
| 57 |
$e->printStackTrace(); |
|---|
| 58 |
} |
|---|
| 59 |
catch (Exception $e) |
|---|
| 60 |
{ |
|---|
| 61 |
if (sfConfig::get('sf_test')) |
|---|
| 62 |
{ |
|---|
| 63 |
throw $e; |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
try |
|---|
| 67 |
{ |
|---|
| 68 |
|
|---|
| 69 |
$sfException = new sfException($e->getMessage().' in '.$e->getFile().' line '.$e->getLine()); |
|---|
| 70 |
$sfException->printStackTrace($e); |
|---|
| 71 |
} |
|---|
| 72 |
catch (Exception $e) |
|---|
| 73 |
{ |
|---|
| 74 |
header('HTTP/1.0 500 Internal Server Error'); |
|---|
| 75 |
} |
|---|
| 76 |
} |
|---|
| 77 |
} |
|---|
| 78 |
} |
|---|
| 79 |
|
|---|