DooPHP IRC channel


Diagnostics needs improvement

Discussion about new desired features.

Diagnostics needs improvement

Postby roman » Sun Dec 20, 2009 2:43 am

Current implementation of diagnostics isn't very useful. Display for most, if not all, exceptions contains the correct message of the exception, but everything else is not shown. PHPTAL library I use throws exceptions with information about template files where a problem occurred (file name, line number, etc.). However, DooPHP's diagnostics displays only the line where exception was caught, in addition to the short message itself:

Code: Select all
Doo::app()->run();


To get more detailed information, I've been temporarily turning off DooPHP's diagnostics, and I would like it to be improved to display all pieces of information in exceptions thrown.
roman
 
Posts: 442
Joined: Sat Aug 01, 2009 8:31 pm

Re: Diagnostics needs improvement

Postby leng » Mon Dec 21, 2009 11:47 am

Could you attach a sample project with PHPTAL that throws the exception? I will see how to make it more useful by utilising the exception's message.
Just Doo IT!
leng
 
Posts: 1482
Joined: Thu Jul 16, 2009 11:33 pm

Re: Diagnostics needs improvement

Postby roman » Mon Dec 21, 2009 11:46 pm

Leng, I attached a zip file with everything you need to run a test (PHPTAL library, a test PHP script, and a template). It's not a DooPHP based test, so put the PHP code into any DooPHP demo app to test.
Attachments
phptal_exception_test.zip
(114.64 KiB) Downloaded 75 times
roman
 
Posts: 442
Joined: Sat Aug 01, 2009 8:31 pm

Re: Diagnostics needs improvement

Postby roman » Tue Dec 22, 2009 12:03 am

The idea is to have all pieces of available potentially useful information displayed, not to have DooPHP diagnostics tailor made for exceptions thrown by PHPTAL library because the library may change the way it does things, and I and other people will deal with other types of exceptions.
roman
 
Posts: 442
Joined: Sat Aug 01, 2009 8:31 pm

Re: Diagnostics needs improvement

Postby leng » Tue Dec 22, 2009 10:33 am

It currently prints out the exception message and print the stack trace out in details.
I wonder what you have in mind on improving the diagnostic view. As for me, I would really want it to print_r() the exception so I can have all the details for debugging.
Just Doo IT!
leng
 
Posts: 1482
Joined: Thu Jul 16, 2009 11:33 pm

Re: Diagnostics needs improvement

Postby roman » Tue Dec 22, 2009 9:42 pm

That's what I want too -- all the details. Look at the attached screenshot of what I get currently. There's some useful info displayed there, but sometimes it's not enough.
Attachments
doo_diagnostics_phptal.jpg
doo_diagnostics_phptal.jpg (70.71 KiB) Viewed 892 times
roman
 
Posts: 442
Joined: Sat Aug 01, 2009 8:31 pm

Re: Diagnostics needs improvement

Postby Mil0s » Wed Dec 23, 2009 10:36 pm

I am getting this error:

Notice: ob_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete. in /var/web/milos/starflirt-admin/dooframework/diagnostic/debug.php on line 137
DooPHP
ob_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete.
Keep it fast and keep it simple!
DooPhp
Mil0s
 
Posts: 221
Joined: Mon Aug 31, 2009 2:15 pm
Location: Serbia

Re: Diagnostics needs improvement

Postby RichardM » Thu Dec 24, 2009 12:23 am

Hi Mil0s,

If you update to the latest version of DooPHP from SVN I have applied a fix for this. Actually I applied the fix twice but it got lost in another update at some point. Just checked and it seems to be in the latest revision I have checked out.


Richard
Note: code samples my not be 100% accurate.
RichardM
 
Posts: 1329
Joined: Sun Aug 30, 2009 6:03 pm
Location: Cumbria, UK

Re: Diagnostics needs improvement

Postby Mil0s » Thu Dec 24, 2009 12:39 am

Ohh, tnx Richard I will download new trunk :)
Keep it fast and keep it simple!
DooPhp
Mil0s
 
Posts: 221
Joined: Mon Aug 31, 2009 2:15 pm
Location: Serbia

Re: Diagnostics needs improvement

Postby roman » Sat Dec 26, 2009 8:06 pm

Improvement in this area would be a good New Year present :)
roman
 
Posts: 442
Joined: Sat Aug 01, 2009 8:31 pm

Next

Return to Features Request

Who is online

Users browsing this forum: No registered users and 0 guests