Hi all, Zend::exception() only returns an exception; it does not currently throw an exception, by design, to avoid such obfuscation:
throw Zend::exception('SomeException', 'Some Message'); Best regards, Darby Bill Karwin wrote: > Nico Edtinger wrote: >> With Zend::exception() we avoid loading all those exception classes >> that are only needed if an error occurs, which should be an exception. >> So instead of loading these files or at least stat()ing it with an >> opcode cache we waste some lines in a file that's loaded anyway. That >> has nothing to do with bugs in any class. > > But it's a good point that this method causes stack traces to become > obfuscated. It reports the __FILE__ and __LINE__ of the exception as > occurring in Zend::exception, because that's where the exception is > actually thrown. > > Regards, > Bill Karwin > >