ID:               45704
 Comment by:       tceverling at yahoo dot co dot uk
 Reported By:      tceverling at yahoo dot co dot uk
 Status:           Open
 Bug Type:         COM related
 Operating System: Windows XP SP2
 PHP Version:      5.2.6
 New Comment:

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.


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

[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 http://bugs.php.net/?id=45704&edit=1

Reply via email to