Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

#31102 [Opn->Csd]: Exception not handled when thrown inside __autoload()
ID:               31102
Updated by:       vrana@php.net
Reported By:      php_nospam at ramihyn dot sytes dot net
-Status:           Open
+Status:           Closed
Bug Type:         Documentation problem
Operating System: Windows 2000 SP4
PHP Version:      5.0.2
New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

"Exceptions thrown in __autoload function cannot be catched in the
'catch' block and result in fatal error."


Previous Comments:
------------------------------------------------------------------------

[2004-12-16 13:04:08] derick@php.net

hehe, perhaps. But we should mention this in the __autoload
documentation though.

------------------------------------------------------------------------

[2004-12-16 12:57:48] php_nospam at ramihyn dot sytes dot net

Your statement about that "last resort" is *not* documented.
The Zend Engine 2 changes list says:

The __autoload() interceptor function will be automatically called when
an undeclared class is to be instantiated. The name of that class will
be passed to the __autoload() interceptor function as its only
argument.

What __autoload() does is breaking the Exception handling, so I
consider this as a bug.

------------------------------------------------------------------------

[2004-12-16 12:28:12] php_nospam at ramihyn dot sytes dot net

Maybe you should rename the function to __lastresort() ;-)
__autoload() sounds like autorun to me.

------------------------------------------------------------------------

[2004-12-15 23:59:35] php_nospam at ramihyn dot sytes dot net

Also notice: the message isn't "Class 'Bug' not found" but an unhandled
exception.

------------------------------------------------------------------------

[2004-12-15 23:38:04] php_nospam at ramihyn dot sytes dot net

Correction: this does *not* happen when i throw an exception inside
__construct(), in this case its also handled correctly.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/31102

--
Edit this bug report at http://bugs.php.net/?id=31102&edit=1

Report this thread to moderator Post Follow-up to this message
Old Post
vrana@php.net
12-30-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:01 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.