From: <php...@li...> - 2011-01-21 10:42:08
|
Hello, Thank you for the response. Regards to what you said, I still don't understand why I can't get the exception message. If I have the following in a java code : throw new MyException("my message"); And the following php code : try { //call to java code } catch (JavaException e) { e->getCause() => returns the complete exception e->getCause()->toString() => returns the exception package and name and the message e->getMessage() or e->getCause()->getMessage() => returns nothing } Please tell me if I'm not using it well Thank you for your response. Regards, Fanny Puaud |---------+-------------------------------------------> | | php...@li...ur| | | ceforge.net | | | | | | 18/01/2011 19:31 | | | Veuillez répondre à | | | php-java-bridge-users | | | | |---------+-------------------------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | Pour : php...@li... | | cc : | | Objet : Re: [Php-java-bridge-users] JavaException->getMessage() returns always an empty string | >--------------------------------------------------------------------------------------------------------------------------------------------------| Hi, It can be considered a bug. But it will stay that way. new JavaException returns a non-null value if you have passed the message in the constructor. For Exceptions generated by Java, the php message is always null, as we cannot override the php getmessage method. The bridge uses exception chaining, so you can get the information from the parent, as usual. Regards, Jost Bökemeier ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |