[
http://jira.jboss.com/jira/browse/JBSEAM-633?page=comments#action_12349588 ]
Nico Gau commented on JBSEAM-633:
---------------------------------
I already implemented that feature, also (as you stated in your forum post), I also
thought it's not useful to transmit the stack trace. So only the message part (and of
course if you overloaded the Exception class all of child class members) are transmitted.
To register exception handlers in a way you stated in the post, only the javascript part
must slightly be changed.
I first thought of way like this:
if Seam.Component.getInstance(..).$FUNC$ assigns no handler in the call then
Seam.Component.getInstance(...) is looked up, if there is a handler, if not Seam.Component
can have a default handler (this is we're someone may install a handler which notifies
that there was a unhandled exception).
I can send you the source code of the remoting part of Seam if you like to.
remoting extension in handling exceptions on client side
--------------------------------------------------------
Key: JBSEAM-633
URL:
http://jira.jboss.com/jira/browse/JBSEAM-633
Project: JBoss Seam
Issue Type: Patch
Components: Remoting
Affects Versions: 1.1.0.GA
Reporter: Nico Gau
Assigned To: Shane Bryzak
Priority: Optional
Hi all,
I don't really know what JIRA is by the way, so hopefully nobody is upset by this
post. I first mailed Gavin but he told me I should put it in JIRA.
I currently work on a project which uses Seam Remoting directly and I didn't find a
neat way in handling errors on the client side as Exceptions are not propagated to it.
Therefore I changed Seam to transmit all exceptions which can be handled in the javascript
part via another callback. E.g.:
Seam.Component.getInstance('userManager').currentUser(function(user) {
alert("user: " + user);
},
function(ex) {
alert("exception occured: " + ex.getMessage());
});
As the exception handler is optional, the change would not brake any client code. If you
are interested in the change, you can reach me at heinzbeinz AT
googlemail.com
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira