You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Ron Grabowski (JIRA)" <ib...@incubator.apache.org> on 2005/05/15 02:01:08 UTC
[jira] Created: (IBATISNET-64) Make sure message parameter on exceptions contain only e.Message instead of e
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
[jira] Closed: (IBATISNET-64) Make sure message parameter on exceptions contain only e.Message instead of e
Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATISNET-64?page=all ]
Gilles Bayon closed IBATISNET-64:
---------------------------------
Resolution: Fixed
Fix Version: DataMapper 1.2
In SVN
> 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
> Assignee: Gilles Bayon
> Priority: Trivial
> Fix For: DataMapper 1.2
>
> 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