Commit Graph

26 Commits

Author SHA1 Message Date
merdan 9489f49958 home page start 2021-03-11 15:16:57 +05:00
Luke Towers 812c0552e8 Avoid logging SystemExceptions twice
SystemExceptions are already logged when the System ServiceProvider listens to the Message Logged event, this code used to be for ApplicationExceptions to bypass the fact that they were explicitly ignored by October's core exception handler.

ApplicationExceptions were added 27 Jan 2015 in 6a68036260
ApplicationExceptions were explicitly ignored in the core exception handler on 16 Feb 2015 in 237d97d87a (diff-b6bf0348130fdd1311473a97536310cdR20) and were explicitly logged in the System exception handler on the same day in 7b52e07b65 (diff-547f5794a63e9f138c33b20de8649b7eR20-R31)

Not sure why that was originally the case, but we've made the decision that ApplicationExceptions shouldn't be logged by default as they should occur semi-regularly in a healthy application (mostly as an expression of complex logical validation that triggers them based on bad user input): https://github.com/octobercms/october/pull/4569#issuecomment-550172508

Fixes octobercms/october#5253.
2020-08-28 13:57:12 -06:00
Samuel Georges 70e57120d0 ApplicationException -> SystemException
This appears to be a typoe. It doesn't make sense to ever log "user errors", only "system errors"

Fixes #4569
2019-12-10 19:59:49 +11:00
Luke Towers c86bec7f08 Replace deprecated Twig class references, refs: #4209. 2019-03-27 13:15:17 -06:00
Luke Towers 7f3fb06945 Support custom 500 page when debug mode disabled and CMS module not present 2019-02-26 14:26:56 -06:00
Samuel Georges b841f9e066 {@inheritDoc} -> @inheritDoc 2017-03-16 06:26:14 +11:00
Samuel Georges ec18697ae2 Cannot use Cms\Classes\Controller as Controller because the name is already in use
Remove test code
2017-03-14 19:42:37 +11:00
Samuel Georges 6af6ebe733 Added config backendForceSecure used to force HTTPS
Refs https://security.googleblog.com/2016/09/moving-towards-more-secure-web.html
2016-12-17 10:16:02 +11:00
Pásztor Gábor 94ab13cd8b Fix exception message, remove some unneded imports. 2016-12-07 21:33:05 +01:00
Samuel Georges b81efa9c46 Might reconsider this, since the exact line in twig is lost 2015-06-04 17:37:29 +10:00
Samuel Georges d02d9ba674 Minor improvement to error handling 2015-05-07 18:00:57 +10:00
Samuel Georges 58ace7ee6c The Twig runtime error is not very useful
Use the previous exception to provide more information
2015-05-02 18:11:26 +10:00
Samuel Georges f0c7b66576 Adds minor safeguard to #1044
^- For objects that can be cast as strings and do not interface Symfony's Response
2015-04-11 11:19:53 +10:00
Matīss Jānis Āboltiņš 26d92d282f Fixed custom error pages outputting headers
If we don't have this method called, then the controller returns an object. From then on, [Symfony converts this object in to a string](https://github.com/symfony/HttpFoundation/blob/master/Response.php#L406). This string is **not just the content of the view**, but the headers as well.

After attaching this method, `handleCustomError()` returns a string and everything works as expected.
2015-04-02 09:59:07 +03:00
Samuel Georges 0abc2de0d1 ApplcationException -> ApplicationException 2015-02-19 00:35:14 +11:00
Samuel Georges 7b52e07b65 Overhaul exceptions, rename triggerapi display -> show 2015-02-16 21:16:43 +11:00
Samuel Georges b1b700368f Radical reorg of some classes 2015-01-28 11:49:54 +11:00
gergo85 f0005d196b Cleanup
Remove whitespaces.
2015-01-03 12:41:23 +01:00
Samuel Georges 33be75af10 Config item `cms.customErrorPage` is deprecated, the setting `app.debug` should be used instead. 2014-12-06 13:22:57 +11:00
Sam Georges 2011a21e6f Minor 2014-11-01 12:03:38 +11:00
Sam Georges c83797231d Subsequent expressions are on a new line (see developer guide > PSR exceptions) 2014-11-01 12:00:45 +11:00
Stefan Talen f85087eac6 Updating modules/system 2014-10-18 11:58:50 +02:00
Sam Georges 45811dfb95 Lean code 2014-09-20 17:56:59 +10:00
Sam Georges 070667ebe0 Improve CMS Exception handler.
Previously Twig syntax errors inside a component partial would show the incorrect file and line number. This is fixed.
Also simplified the approach so the stack trace is not hidden inside a closure.
2014-06-24 14:58:46 +10:00
Pascal Borreli 459c8e0cfa Fixed typos 2014-05-17 18:08:01 +02:00
Sam Georges 71a5dd67ab Welcome to the world, October :-) 2014-05-14 23:24:20 +10:00