Bug #61442 [ReO->Csd]: exception threw in __autoload can not be catched
| From: | laruence@php.net | Date: | Wed, 19 Sep 2012 11:41:30 +0000 |
| Subject: | Bug #61442 [ReO->Csd]: exception threw in __autoload can not be catched | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-173563@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61442&edit=1
ID: 61442
User updated by: laruence@php.net
Reported by: laruence@php.net
Summary: exception threw in __autoload can not be catched
-Status: Re-Opened
+Status: Closed
Type: Bug
Package: SPL related
Operating System: Linux, FreeBSD
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fd0b3ea663431b7adaedde11668fbc0b6ba07494
Log: Fixed bug #61442 (exception threw in __autoload can not be catched)
Previous Comments:
------------------------------------------------------------------------
[2012-09-19 10:37:21] yks-uno at yandex dot ru
That is what it was all about.
Again sorry for resentment, thanks for clearing things up.
------------------------------------------------------------------------
[2012-09-19 10:33:07] laruence@php.net
hmm, seems I thought wrongly,
try {
new AAAA();
} catch () {
}
can be catched in 5.3
but
try {
AAA:xxx();
}
can not be catched in 5.3, but can be catched in 5.4.
------------------------------------------------------------------------
[2012-09-19 10:09:14] laruence@php.net
and the 5.3.0+ seems should be 5.3+ (I mean 5.4 works fine).
------------------------------------------------------------------------
[2012-09-19 10:03:24] laruence@php.net
http://us.php.net/autoload
"Note:
Prior to 5.3.0, exceptions thrown in the __autoload function could not be caught
in the catch block and would result in a fatal error. From 5.3.0+ exceptions
thrown in the __autoload function can be caught in the catch block, with 1
provision. If throwing a custom exception, then the custom exception class must
be available. The __autoload function may be used recursively to autoload the
custom exception class."
------------------------------------------------------------------------
[2012-09-19 08:54:26] yks-uno at yandex dot ru
And please would you mind to show the exact place in the PHP documentation where it is stated that
an autoload handler ALWAYS DIES regardless of exceptions or substituting another class if it does
not find the class it is trying to load?
Or there is "no information available, might only be in SVN" ???
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=61442
--
Edit this bug report at https://bugs.php.net/bug.php?id=61442&edit=1