No I'm not, I'm saying basically what you are -- the framework should be repointing the exception to the correct location. I'm simply implying that for "internal" ZF exceptions we can afford to pass the __LINE__ or __FILE__ in the code. If this can be done transparently from the exception base class in a factory model (I believe it can) then that makes the most sense.
John -- John Coggeshall Team Lead NA Pro. Services Zend Technologies > -----Original Message----- > From: Ralph Schindler [mailto:[EMAIL PROTECTED] > Sent: Monday, December 18, 2006 1:32 PM > To: [EMAIL PROTECTED] > Cc: 'Zend Framework General' > Subject: Re: [fw-general] Re: Do we really need Zend::exception()? > > In this situation you are offloading the setting to the user > which could be cumbersome. > > I guess now that ive got 2 eyes fixed on the current > solution, I wonder why ::exception lives in the Zend class > and not in the Zend_Exception class? Wouldn't it make more > sense to have Zend_Exception::factory($class, $message); ? > > This factory method would do the trace lookback (after parent > Exception > construction) to determine the line and file number that > called it, and perhaps that is stored in local protected > variables $callerFile, and $callerLine. > > I guess I could sort of understand the arguement that > Zend::exception() is easier to write than > Zend_Exception::factory, but to me, I opt for logical > organization over convienence at the core level. After this > is written, this code wont change much in the library. > > My 2cents ;) > -ralph > > John Coggeshall wrote: > > Exception() base doesn't include the method, but the properties > > ($e->line, and $e->file I *believe*, check the docs) are > protected so > > you should be able to implement your own setFile() and setLine() > > methods from the extended Zend_Exception. > > > > John > > > > -- > > John Coggeshall > > Team Lead NA Pro. Services > > Zend Technologies > > >