Reply to thread

I'm just thinking out loud here, but what about if each addon's class extensions had its own (optional) assigned exception handler? It could (theoretically) be toggled in addon.json, it would be the class path such as DBTech/Security/XF/Exception/Handler (or whatever).


Although as I'm typing this, maybe XF doesn't have enough control over the code to automatically add the overridden exception handler to the start & finish of each function...


In either case, I can see a lot of uses for this. It would let us create an optional feature in our mods to automatically submit exceptions, or a button in the server error log for transmitting exceptions to a developer-specified endpoint.


Actually, maybe that is a more reasonable suggestion? If XF was able to detect which addon ran a specific function at a specific time, via an overridden exception handler or some other means, the exception could have an addon_id column in the error log table.


We could then specify a class in addon.json for handling exceptions, and give users a button in the server error log that would invoke this class and flag it as "reported".


I'm gonna do some research into XFCP and see if this is feasible at all, I made myself excited now :D



Fillip


Back
Top Bottom