Deltanic Posted November 12, 2014 Share Posted November 12, 2014 Is it possible to disable ProcessWire's custom exceptions? I'm building an abstraction layer ontop of ProcessWire and would love to use xDebug. However, as PW currently works, this isn't really going well as seen below: Both messages display and xDebug isn't of any use. So is it possible to disable PW error and exception messages, and if so, how? Thanks in advance. Link to comment Share on other sites More sharing options...
Deltanic Posted November 17, 2014 Author Share Posted November 17, 2014 Bumping due to desperate need. Link to comment Share on other sites More sharing options...
Deltanic Posted December 4, 2014 Author Share Posted December 4, 2014 Bumping some more. It really should be possible to disable ProcessWire's exception/error handling.. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted December 4, 2014 Share Posted December 4, 2014 PW is not 'failing' for a dumb reason and it tell you what has gone wrong. You can do a try & catch to handle it. 2 Link to comment Share on other sites More sharing options...
netcarver Posted December 4, 2014 Share Posted December 4, 2014 @Deltanic, I use xdebug with PW almost daily. It works great and I don't need to disable any PW exceptions to get it working. In my case, I use xdebug along with the vdebug plugin for vim and the xdebug helper extension for chrome (similar ones exist for FF) and they do take some configuration to get right - but none of it in PW. Could you explain exactly what problem it is you are having with using xdebug? 2 Link to comment Share on other sites More sharing options...
Deltanic Posted December 4, 2014 Author Share Posted December 4, 2014 PW is not 'failing' for a dumb reason and it tell you what has gone wrong. You can do a try & catch to handle it. What? I'm not saying PW is 'failing' on me, I'm saying I don't need both xDebug and PW exception messages. This has nothing to with my code, or how to handle an exception. @Deltanic, I use xdebug with PW almost daily. It works great and I don't need to disable any PW exceptions to get it working. In my case, I use xdebug along with the vdebug plugin for vim and the xdebug helper extension for chrome (similar ones exist for FF) and they do take some configuration to get right - but none of it in PW. Could you explain exactly what problem it is you are having with using xdebug? Interesting. I haven't got any luck so far. As you can see in the picture in the OP, my xDebug messages are all put in a single message, rather than having the callstack. Considering PW does provide the callstack well formatted, my initial thought was to disable PW exceptions and have it all being displayed through xDebug. Still not sure what I could do to get my xDebug messages right, but to me it looks like PW is somewhere having an exception and/or error handler that throws its own error message. Link to comment Share on other sites More sharing options...
netcarver Posted December 4, 2014 Share Posted December 4, 2014 @Deltanic, It sounds like you are doing after-the-fact debugging using the call-stack shown in the browser. I try not to do that as I don't find it as helpful as using breakpoints or single-stepping new code in my IDE of choice (chrome + xdebug helper & vim + vdebug.) In an IDE you get the full call-stack, variables, code, execution location and can use breakpoints etc. As you can see in the picture in the OP, my xDebug messages are all put in a single message, rather than having the callstack. Considering PW does provide the callstack well formatted, my initial thought was to disable PW exceptions and have it all being displayed through xDebug. Still not sure what I could do to get my xDebug messages right Regarding cleaning up the format of the xdebug callstack output - have you tried the xdebug stack-trace documentation? (There's plenty of good documentation for xdebug.) Like I said, I don't use xdebug the way you seem to want to so I can't help any more than that. I would recommend giving some kind of IDE a go - as I find it so much more convenient for debugging than in-browser stack traces. 4 Link to comment Share on other sites More sharing options...
netcarver Posted December 8, 2014 Share Posted December 8, 2014 @Deltanic, I've just been stepping through the ProcessWire code and spotted a potential lead for you. Try commenting out line 205 and then 217-227 of index.php in the root of your development site install. 1 Link to comment Share on other sites More sharing options...
owzim Posted December 8, 2014 Share Posted December 8, 2014 @netcarver thanks on the insight, I'll try this chrome extension. Currently I use xdebug but the stack trace (without the break points you mentioned) is rarely of any real use. I also us the Chrome Logger module by soma, which is very useful most of the time, but it uses html headers which are sometimes too big because the objects it tries to log, are too complex. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now