Author: aadamchik
Date: Fri Feb 5 11:25:21 2010
New Revision: 906903
URL: http://svn.apache.org/viewvc?rev=906903&view=rev
Log:
CAY-1165 Stop unwinding runtime exceptions
log ROP server side exception before unwinding
Modified:
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/service/BaseRemoteService.java
Modified:
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/service/BaseRemoteService.java
URL:
http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/service/BaseRemoteService.java?rev=906903&r1=906902&r2=906903&view=diff
==============================================================================
---
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/service/BaseRemoteService.java
(original)
+++
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/service/BaseRemoteService.java
Fri Feb 5 11:25:21 2010
@@ -150,19 +150,21 @@
return DispatchHelper.dispatch(handler.getChannel(), message);
}
catch (Throwable th) {
- th = Util.unwindException(th);
- logObj.info("error processing message", th);
+
+ StringBuilder wrapperMessage = new StringBuilder();
+ wrapperMessage.append("Exception processing message ").append(
+ message.getClass().getName()).append(" of type
").append(message);
+
+ String wrapperMessageString = wrapperMessage.toString();
+ logObj.info(wrapperMessageString, th);
// This exception will probably be propagated to the client.
// Recast the exception to a serializable form.
- Exception cause = new Exception(th.getLocalizedMessage());
+ Exception cause = new Exception(Util
+ .unwindException(th)
+ .getLocalizedMessage());
- StringBuilder wrapperMessage = new StringBuilder();
- wrapperMessage.append("Exception processing message ")
- .append(message.getClass().getName())
- .append(" of type ").append(message.toString());
-
- throw new CayenneRuntimeException(wrapperMessage.toString(),
cause);
+ throw new CayenneRuntimeException(wrapperMessageString, cause);
}
}