Commit graph

103 commits

Author SHA1 Message Date
Ceeram
d4986b5f24 add responseHeader() method to new base exception class, ExceptionRenderer will pass the headers to the response.
Tests added.
2012-08-09 14:52:05 +02:00
ADmad
8931b74ba2 Removed variable escaping in CakeErrorController::beforeRender(). Closes #3074 2012-08-05 02:36:29 +05:30
mark_story
ab6fab6675 Add missing import. 2012-07-21 20:42:46 -04:00
mark_story
e2781a536a Fix whitespace error. 2012-06-23 21:03:15 -04:00
mark_story
5e54be4e5a Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Error/exceptions.php
2012-06-23 16:41:32 -04:00
Ceeram
b913fe5303 better error message in MissingConnectionException when driver is not enabled 2012-06-23 11:42:26 +02:00
ADmad
9ce216b09d Revert "Fix missing view variables."
Commit 7416c53 shows error message from last exception instead of first one
and also displays framework specific error messages instead of generic ones with debug off.
We don't want either.

This reverts commit 7416c530a2.
2012-06-11 02:36:51 +05:30
ADmad
fa0d1c7997 Fix layout path value causing View to generate layout paths with extra slash at end 2012-06-10 22:19:39 +05:30
Ceeram
4c6453501e Merge branch '2.1' into 2.2 2012-06-02 01:47:21 +02:00
Rachman Chavik
07d9a75fcb Helpers in custom CakeErrorController are lost
Since many exceptions do not have its own 'template' file, customized
APP/Controller/CakeErrorController with its own list of helpers could be
ignored.

This happens becase ExceptionRenderer is forced to to use _outputMessageSafe
when a template is missing.  This causes Controller::$helpers to be reset with
default values.
2012-06-01 15:28:06 +07:00
Jelle Henkens
f7ce5262b7 Updating mixed @param documentation to seperate list of accepted types 2012-05-21 21:55:10 +01:00
Rachman Chavik
e6860fb856 changing LOG_ERROR to LOG_ERR in core files 2012-05-13 18:51:57 +07:00
mark_story
7416c530a2 Fix missing view variables.
When rendering a exception caught when rendering
an exception, some view variables were missing causing fatal
errors.

Fixes #2843
2012-05-05 13:30:18 -04:00
mark_story
efe836480b Fix error when rendering fatal error page.
If you included parse errors in AppController, the fatal error
page would not correctly display.
2012-05-05 12:54:41 -04:00
Jose Lorenzo Rodriguez
bf0f5ab118 Merge remote-tracking branch 'origin/2.1' into 2.2 2012-04-29 20:05:39 -04:30
Kyle Robinson Young
b8488b8dfe Update 1.x @link in docblocks 2012-04-26 19:49:18 -07:00
Thomas Ploch
daa695b4d3 Added NotImplementedException with status code 501 2012-04-25 15:44:48 +02:00
Jose Lorenzo Rodriguez
8465538800 Merge branch '2.2-middleware' into 2.2 2012-04-22 17:17:36 -04:30
Jose Lorenzo Rodriguez
565a58f784 Introducing dispatcher filters and adding tests for them 2012-04-16 00:36:08 -04:30
Juan Basso
9beaa9602f Unified error handlers. Now the regular error handler will receive the fatal errors too. 2012-04-14 16:08:36 -04:00
Juan Basso
1428659f88 Moved the fatal error detection to App::shutdown and keeping the fatal error handler cleaner. It helps to be extended by applications/plugins. 2012-04-14 16:08:35 -04:00
Juan Basso
440f0c38eb Added a handler for fatal errors, showing internal server error page when debug is disabled or a custom fatal error page when enabled. 2012-04-14 16:08:35 -04:00
Ceeram
c2a8fca00c Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
2012-04-05 23:27:21 +02:00
ADmad
c6ce15720e Revert "Always use error layout when rendering error pages."
This reverts commit 3495422ac5.
2012-04-06 00:47:50 +05:30
mark_story
77f698dbcd Fix which request is used for error pages.
The most recent request in the request stack should be used,
as it is most likely the request containing an exception.

Fixes incorrect error pages generated inside requestAction() calls.

Fixes #2746
2012-04-03 13:24:36 -04:00
ADmad
3495422ac5 Always use error layout when rendering error pages. 2012-03-31 12:42:17 +05:30
ADmad
0832e18e9e Adding separate error layout for CakeErrorController as using default layout often caused nested errors. Closes #2682 2012-03-18 14:05:41 +05:30
Juan Basso
c754fb2dcb Updated copyright to 2012. 2012-03-12 22:46:46 -04:00
Juan Basso
3b1bd90ad6 Updated copyright to 2012. 2012-03-12 22:46:07 -04:00
mark_story
60989ad6c8 Fix coding standard issues in Error/ 2012-03-03 19:46:15 -05:00
Mark Story
9e8152f949 Merge pull request #417 from 0x20h/php-acl
PHP config file based ACL implementation
2012-02-19 19:34:56 -08:00
mark_story
2afb05b590 Merge branch '2.0' into 2.1
Conflicts:
	app/View/Pages/home.ctp
	lib/Cake/Config/config.php
	lib/Cake/Core/App.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/NumberHelper.php
2012-02-12 10:06:13 -05:00
Thomas Ploch
94e5ec0545 Added handling of E_USER_DEPRECATED to ErrorHandler and Debugger. 2012-02-05 12:10:07 +01:00
mark_story
18cb9a2fc8 Fix content type errors.
'serialize' should be '_serialize'.
2012-02-04 11:12:45 -05:00
mark_story
437d68c60b Handle the case where viewPath changes.
Fixes #2537
2012-02-03 21:29:37 -05:00
mark_story
ee083e047e Fix errors with missing sub directories.
Missing content-type specific errors shouldn't trigger fatal errors.
Instead a html view should be rendered as a last resort.

Fixes #2537
2012-02-02 21:25:46 -05:00
0x20h
6ddf6dad36 reverting my mistake 2012-01-13 21:50:03 +01:00
0x20h
153152642c PHP configuration file base Acl implementation 2012-01-13 21:43:48 +01:00
mark_story
2e8498e166 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Test/Case/Console/TaskCollectionTest.php
	lib/Cake/Test/Case/Model/ModelIntegrationTest.php
	lib/Cake/Test/Case/Utility/ClassRegistryTest.php
	lib/Cake/Utility/ClassRegistry.php
2011-12-11 22:51:40 -05:00
Kyle Robinson Young
1e1c7a036d Code consistency formatting tweaks 2011-12-06 12:52:48 -08:00
euromark
f9d12563a3 Translation fix
Fixes #2340

Signed-off-by: mark_story <mark@mark-story.com>
2011-12-06 12:33:47 -05:00
mark_story
d9482fef25 Limit what exceptionrenderer outputs.
The exception object should not be part of production errors.
2011-11-27 23:51:49 -05:00
mark_story
cfbc43671e Starting content type specific error pages.
- Adding RequestHandler to the error controller.  This allows reuse
  of all of Cake's internals.
- Adding a simple JsonView class to do serialized JSON views.
- Adding serialize hooks, and wiring things together.
2011-11-27 23:51:47 -05:00
mark_story
21cd3f00ac Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/BasicsTest.php
2011-11-19 20:40:07 -05:00
mark_story
3e2f8ddf98 CakeException subclasses render correctly now.
CakeException subclasses without their own view files, would trigger
a MissingViewException, which would result in no application helpers
being used.  This could cause issues when app helpers are used
in the layout.

Instead a error500 template is rendered using app helpers.

Fixes #2274, fixes #2004
2011-11-19 20:25:20 -05:00
Rachman Chavik
408e785d5e Display datasource name in exceptions and error page.
When working with multiple databases, it's helpful to display
the datasource name that is requested by a given model.
2011-11-17 11:24:45 +07:00
mark_story
18a34c03a4 Fix issue where unknown exceptions would be squashed.
Fix issue where unknown exceptions with error codes that were not
in HTTP ranges would be ignored.  In development those messages
should display.

Fixes #2205
2011-11-02 21:21:48 -04:00
mark_story
d62351eb36 Revert the changes done to remove the 'cake' domain
After some discussion, polutting the app POT file
with unchanging Cake strings was incorrect.  Having these
strings in a separate POT file allows reuse of translations across
projects.

Refs #2103
2011-10-23 20:36:31 -04:00
Majna
a9dbde0cbd Fixing incorrect doc blocks regarding error handler. 2011-10-23 21:55:20 +02:00
Renan Gonçalves
1cf67b1e55 Little cleanup in exceptions.
- Removed duplicated or non-used exceptions.
- Making the error messages more descriptive and stardard.
2011-10-15 20:08:02 +02:00