View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
11303 | Bug reports | Plugins | public | 2016-05-31 08:44 | 2016-06-03 15:18 |
Reporter | frederikprijck | Assigned To | |||
Priority | none | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Summary | 11303: Allow Error Handling | ||||
Description | Hi, I was talking with Mazi on IRC about a plugin I would love to write. However, I am not able to find the correct hook for my use case. Mazi told me to go to bugs.limesurvey.com and describe my usecase. We would love to create a plugin that logs our PHP Exceptions to RayGun (https://raygun.com/). However, I do not seem to find the correct hook for LimeSurvey to handle Exceptions. My guess is there are 2 Events that can be usefull:
Events to handle exception handling will help the community in production environments. Maybe we can have a chat about this ? I can do the PR for LimeSurvey 2.06lts if changes are needed to be able to hook into exceptions. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 2.06lts | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | N.A. | ||||
Server OS (if known) | N.A. | ||||
Webserver software & version (if known) | N.A. | ||||
PHP Version | N.A. | ||||
So basicly my usecase has two parts:
|
|
Denis, what do you think, how can we best deal with it? Does Yii support catching errors and logging them? That may be a good start for a new plugin event. |
|
See http://www.yiiframework.com/doc/guide/1.1/en/topics.error And get inspiration : https://github.com/SondagesPro/LimeSurvey-SondagesPro/commit/b87289a229bf6bfacd091cf22b56f1471385ae50 But, actually : i don't know if anything was implemented in 2.50 or 2.06. |
|
Controller is actually to late to hook into error handling. Errors can occur in routing, controller constructors ... |
|
I'll currently implement the exception logging on controller level. But I do think it would be a great addition for LimeSurvey to be able to have a better exception handling for production environments using plugins, as that way every team can plugin their prefered exception handling tool. |
|
I don't say you can use exiting plugin event :). But get inspiration on this event to allow plugin to add their own exception handling. There are surely some solution in Yii :). You're right : it's not the role of the controller to handle error. |
|
Could you please open this ticket as a feature request and not a bug report? |
|
thank you ;-) |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2016-05-31 08:44 | frederikprijck | New Issue | |
2016-05-31 08:46 | frederikprijck | Note Added: 39037 | |
2016-05-31 08:51 | Mazi | Assigned To | => DenisChenu |
2016-05-31 08:51 | Mazi | Status | new => assigned |
2016-05-31 08:52 | Mazi | Note Added: 39038 | |
2016-05-31 09:01 | DenisChenu | Assigned To | DenisChenu => |
2016-05-31 09:05 | DenisChenu | Note Added: 39039 | |
2016-05-31 09:10 | frederikprijck | Note Added: 39040 | |
2016-06-01 08:41 | frederikprijck | Note Added: 39054 | |
2016-06-01 08:47 | DenisChenu | Note Added: 39055 | |
2016-06-01 08:47 | DenisChenu | Status | assigned => new |
2016-06-01 08:48 | DenisChenu | Note Edited: 39055 | |
2016-06-03 11:15 |
|
Note Added: 39132 | |
2016-06-03 11:15 |
|
Assigned To | => LouisGac |
2016-06-03 11:15 |
|
Status | new => feedback |
2016-06-03 11:26 | frederikprijck | Note Added: 39134 | |
2016-06-03 11:26 | frederikprijck | Status | feedback => assigned |
2016-06-03 15:18 |
|
Note Added: 39202 | |
2016-06-03 15:18 |
|
Status | assigned => closed |
2016-06-03 15:18 |
|
Resolution | open => fixed |