|
From: <php...@li...> - 2008-05-12 15:03:59
|
Wow, that was a pretty poorly written sentence. Sorry about that.
What I intended to say was, I was to get the Throwable::getMessage()
from the php side. We'd like to be able to use that for some user
level messaging. That method is giving us what we expect on the Java
side, however, something seems to be lost in the php bridge
translation.
Throwable::getCause() is giving us what we would expect (see below):
PHP:
try{
$email_address_obj = new Java("type.Test", $email_address);
return $email_address_obj;
} catch (JavaException $ex)
{
echo "Cause: ".$ex->getCause()."\n"; // displaying a result
echo "Message: ".(string) $ex->getMessage()."\n"; // not displaying result
}
Thanks,
Zach
__________________
Gulo Solutions
http://blog.gulosolutions.com
773.276.8066
-----Original Message-----
From: php...@li... <php...@li...>
To: php...@li...
Date: Saturday, May 10, 2008, 2:38:31 PM
Subject: [Php-java-bridge-users] Handling Exceptions thrown from java on php side...
Hi,
> My issue is, I want to out the message Exception was instantiated
what do you mean with this? $exception->getCause() contains all information you need.
You could coerce the JavaException to that it prints a stack trace which is compatible with other
PHP exceptions, but this shouldn't be default, I think.
Nicht vergessen! Am Sonntag, den 11. Mai ist Muttertag
Geschenkideen, Gedichte & mehr: www.yahoo.de/muttertag
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.16/1427 - Release Date: 5/11/2008 1:08 PM
|