From: <php...@li...> - 2006-08-11 13:11:39
|
Hi Jost, Well thanks a lot for your explanation, and sorry for my misunderstanding of the documentation (in fact if $ex->getCause() was returning the error message, it was because it automatically invoked the toString() java method of the Exception object - I just didn't realize I had to test the $ex->getCause()'s type and not the type of $ex itself). Many thanks! Etienne > Hi Etienne, > > > invoked function's returned exception's type is > > lost. > > $ex->getCause() returns the wrapped exception: > > function getMyException() { > static $MyException = new JavaClass("MyException"); > return $MyException; > } > > try { > ... > } catch (JavaException $ex) { > > if(java_instanceof($ex->getCause(),getMyException())) > { > ... > } > } > > > I'll fix the documentation. > > > Regards, > Jost Boekemeier |