Hi,
What would be the correct approach for handling exceptions at admin
services? Is it to throw the wrapped exception("throw new
FooException(message, e)"), or to throw the exception without wrapping the
original exception ("throw new FooException(message)")? (in both cases
exception is logged before throwing)
If it is the first way, the exception's stacktrace will be duplicated if
both client and server are in single machine. And the exception stacktrace
at client would have information that should not be sent to the client
(e.g. SQL queries)
If it the second way, the client will not be able to have the exact cause
for the exception, which the client may find useful. So what could be the
best option for this? Are there any better ways handling this?
--
*Pulasthi Mahawithana*
Software Engineer
WSO2 Inc., http://wso2.com/
Mobile: +94-71-5179022
Blog: http://blog.pulasthi.org
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev