View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
11333Feature requestsPluginspublic2016-06-03 15:19
Reporterfrederikprijck Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary11333: 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/ [^]).
RayGun has a PHP extension to integrate this inside PHP: https://github.com/MindscapeHQ/raygun4php [^]

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:

  • Some event to hook in to the application bootstrap to set up the php set_exception_handler and set_error_handler handlers.
  • Some event that is raised when an error occurs.
  • Or are there other possibilities inside limesurvey ?

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.

Additional Information

Recreated as feature request from: https://bugs.limesurvey.org/view.php?id=11303

TagsNo tags attached.
Bug heat6
Story point estimate
Users affected %

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-06-03 11:46

developer   ~39137

Yii have some system :
http://www.yiiframework.com/doc/guide/1.1/en/topics.error#handling-errors-using-an-action

It can really be a great idea : example : show PHP Error only to super admin or shown file/line etc ... only in some con,dition etc ....

frederikprijck

frederikprijck

2016-06-03 11:50

reporter   ~39139

Maybe it would be a good idea to implement this in the core of LS:

  • Yii ActionError => new PluginEvent("ErrorEvent") and include $error

Now plugins can be written to handle this $error:

  • plugin 1: txtfile (could be a core LS plugin)
  • plugin2: SQL database (could be a core LS plugin)
  • plugin3: RayGun (thirt party plugin)
  • ...
LouisGac

LouisGac

2016-06-03 15:19

developer   ~39203

https://bugs.limesurvey.org/view.php?id=11303

Issue History

Date Modified Username Field Change
2016-06-03 11:25 frederikprijck New Issue
2016-06-03 11:46 DenisChenu Note Added: 39137
2016-06-03 11:50 frederikprijck Note Added: 39139
2016-06-03 15:19 LouisGac Note Added: 39203