a_bertrand Posted November 9, 2012 Share Posted November 9, 2012 Before the error handling inside NWE was less than optimal usually showing something which was in the best cases hard to decrypt and in other not even pointing to the right direction. In this release I spent quiet some time on improving the error handling. It now shows error which are easier to understand, showing the stack trace in a readable format, in some cases giving even hints about what the issue could be, and even showing the bad SQL query you tried to run. Also, with a trick, the engine will now even be able to catch parsing errors (missing ; or more) inside your modules. In the cases below you will see a "HINT" text, which is a small text I added to try to help understand common errors. Of course that's not a PHP book or the solution to all, but it may help find common issues quicker, at least for those starting programming in PHP. Parsing error (previously it wasn't catch by the engine): [ATTACH=CONFIG]752[/ATTACH] Evaluated code error (for example custom conditions / actions in the items) [ATTACH=CONFIG]753[/ATTACH] use $_POST['something'] without checking if we got it ? [ATTACH=CONFIG]754[/ATTACH] Wrong SQL query: [ATTACH=CONFIG]755[/ATTACH] Forget to add the $ sign? [ATTACH=CONFIG]756[/ATTACH] Wrong variable name? [ATTACH=CONFIG]757[/ATTACH] Quote Link to comment Share on other sites More sharing options...
realmoflegends Posted November 9, 2012 Share Posted November 9, 2012 Love it! Ran into this once or twice already, and this should help a bunch. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted November 9, 2012 Author Share Posted November 9, 2012 Personally the SQL error is the most common I have issue with. So far it was triggering some generic error, and I had to put an var_dump, exit to see the SQL. Now it will be even for me much easier to debug ;-) Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted November 9, 2012 Share Posted November 9, 2012 Good job Alain Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted November 9, 2012 Author Share Posted November 9, 2012 BTW The look of the error is handled by a template, so nothing prevent you to use either the same template as your game or have another special one. I personally keep this yellow one to make sure to see the difference. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.