DooPHP IRC channel


Diagnostics needs improvement

Discussion about new desired features.

Re: Diagnostics needs improvement

Postby leng » Sat Dec 26, 2009 8:17 pm

roman, how do you call that PHPTAL thing? I get this from your code (I throw the code in the controller):
Code: Select all
class MainController extends DooController{
   function tal(){
      Doo::loadClass("lib/phptal");
      $tpl = new PHPTAL( Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . "view/repeatTest.html");
      $tpl->items = array(1=>"a", 2=>"b", 3=>"c", 4=>"d");
      $output = $tpl->execute();
      echo $output;
   }


I have the Exception
Capture.JPG
Capture.JPG (84.99 KiB) Viewed 495 times
Just Doo IT!
leng
 
Posts: 1482
Joined: Thu Jul 16, 2009 11:33 pm

Re: Diagnostics needs improvement

Postby roman » Sun Dec 27, 2009 4:47 am

The way you called it, Leng, is essentially how I call it too; although, I don't use Doo::loadClass(). I include that file prior to instantiating an object. And I also have the main template file call a macro from another file.

Did you get that with the current framework code?
roman
 
Posts: 442
Joined: Sat Aug 01, 2009 8:31 pm

Re: Diagnostics needs improvement

Postby leng » Sun Dec 27, 2009 4:56 am

yes with the latest. Maybe try loadClass.
Also, what does the code looks like?
And I also have the main template file call a macro from another file.
Just Doo IT!
leng
 
Posts: 1482
Joined: Thu Jul 16, 2009 11:33 pm

Re: Diagnostics needs improvement

Postby RichardM » Sun Dec 27, 2009 10:25 am

leng wrote:
Capture.JPG


I think the issue i sometimes have with these stack traces is that you get told the error is in the run() method...but really its not. I have not tried var_dump'ing the exception to determine if this is all it knows or if there is a more accurate set of line info we could dump which would be of more use when debugging.

@leng, I have an exception handler somewhere here that might have some code for getting 'more info' out of exceptions...I'll try and dig it up and send you a copy.


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 leng » Sun Dec 27, 2009 12:40 pm

@Richard that would be great, thanks in advance.
Just Doo IT!
leng
 
Posts: 1482
Joined: Thu Jul 16, 2009 11:33 pm

Re: Diagnostics needs improvement

Postby roman » Sun Dec 27, 2009 6:39 pm

RichardM wrote:I think the issue i sometimes have with these stack traces is that you get told the error is in the run() method...but really its not.

This is exactly the issue I've brought up here, Richard.

Leng, I haven't had time to try to use Doo::loadClass() yet. But it seems that Richard experiences the same problem I do even though he doesn't use PHPTAL. I will try to get to try Doo::loadClass() and see if I get different results. What's the benefit of using it over regular require or include, by the way?
roman
 
Posts: 442
Joined: Sat Aug 01, 2009 8:31 pm

Re: Diagnostics needs improvement

Postby RichardM » Sun Dec 27, 2009 6:51 pm

I dont think this actually has anything to do with the actual problem but is actually down to the fact that one persons code is invalid in one way and the other is invalid for another reason. Eg. One might have a variable name typo and the other has a syntax error. (This is not necessarily the case...rather just 2 examples I came up with).

I have sent leng on some code i got and modified a little from the php manual site so hopefully the information available from errors will improve some more soon.


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

Previous

Return to Features Request

Who is online

Users browsing this forum: No registered users and 1 guest

cron