Make sure message parameter on exceptions contain only e.Message instead of e -----------------------------------------------------------------------------
Key: IBATISNET-64 URL: http://issues.apache.org/jira/browse/IBATISNET-64 Project: iBatis for .NET Type: Improvement Reporter: Ron Grabowski Assigned to: Gilles Bayon Priority: Trivial I don't know if this is by design or just an oversite. I noticed that when an exception is caught and re-thrown, most of the exceptions have the Message of the inner exception in the new exception: // this looks good to me throw new DataMapperException("Unexpected error while repaginating paged list. Cause: " + e.Message, e); Some exceptions include the entire inner exception which is essentially the complete stack trace when e is turned into e.ToString(): // ??? throw new ProbeException("Error getting ordinal value from .net object. Cause" + e, e); throw new ProbeException("Error getting ordinal value from .net object. Cause" + e, e); throw new ConfigurationException("Error. Could not set TypeHandler. Cause: " + e, e); throw new DataMapperException("Error parsing date. Cause: " + e, e); Shouldn't those be: // corrected ??? throw new ProbeException("Error getting ordinal value from .net object. Cause" + e.Message, e); throw new ProbeException("Error getting ordinal value from .net object. Cause" + e.Message, e); throw new ConfigurationException("Error. Could not set TypeHandler. Cause: " + e.Message, e); throw new DataMapperException("Error parsing date. Cause: " + e.Message, e); I did a search for: + e, e); in Visual Studio and I only found four exceptions that didn't look correct. Also, I think there's a single quote missing from this exception: // single quote missing towards the end throw new ConfigurationException ("Error configuring controller named '"+_id+". Cause: " + e.Message, e); // corrected throw new ConfigurationException ("Error configuring controller named '"+_id+"'. Cause: " + e.Message, e); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira