Bug #45704 [Opn->Csd]: $exception->getCode() always return 0x80020009 even when it shouldn't
| From: | yohgaki@php.net | Date: | Wed, 31 Jul 2013 02:09:58 +0000 |
| Subject: | Bug #45704 [Opn->Csd]: $exception->getCode() always return 0x80020009 even when it shouldn't | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180597@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=45704&edit=1
ID: 45704
Updated by: yohgaki@php.net
Reported by: tceverling at yahoo dot co dot uk
Summary: $exception->getCode() always return 0x80020009 even
when it shouldn't
-Status: Open
+Status: Closed
Type: Bug
Package: COM related
Operating System: Windows XP SP2
PHP Version: 5.2.6
-Assigned To:
+Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
It seems fixed at least in 5.5.1.
Windows7 x86.
Previous Comments:
------------------------------------------------------------------------
[2009-10-16 09:01:15] andrey dot klimovskiy at f-secure dot com
I would like to catch and process custom COM exceptions at PHP, but
$exception->getCode() always return 0x80020009. The same situation for standart HRESULT values.
------------------------------------------------------------------------
[2009-02-16 09:27:13] tceverling at yahoo dot co dot uk
This bug is still present in "Apache/2.2.10 (Win32) PHP/5.2.8", Windows XP SP3.
We are still unable to use the codes provided by the thrown exceptions to provide alternative paths
or give meaningful messages either to the user or to an error log.
------------------------------------------------------------------------
[2008-08-04 07:30:18] tceverling at yahoo dot co dot uk
Description:
------------
When a COM object throws an exception, the getCode() always return 0x80020009 even when it should be
some other value.
This is reproducible with "Scripting.FileSystemObject", "Scripting.Dictionary"
and "Autodesk.MgSdfToolkit".
Reproduce code:
---------------
echo 'For "Scripting.FileSystemObject".';
try {
$fso = new COM("Scripting.FileSystemObject");
$f = $fso->GetFile("c:\\does not exist.txt");
}
catch (Exception $e) {
//print_r($e);
echo dechex($e->getCode());
}
echo 'For "Scripting.Dictionary".';
try {
$d = new COM("Scripting.Dictionary");
$d->Remove("b");
}
catch (Exception $e) {
//print_r($e);
echo dechex($e->getCode());
}
Expected result:
----------------
For 'Scripting.FileSystemObject': 800A0035
For 'Scripting.Dictionary': 800A802B
Actual result:
--------------
For 'Scripting.FileSystemObject': 80020009
For 'Scripting.Dictionary': 80020009
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=45704&edit=1