'#region Load TypeHandlers' has incorrect message for ConfigurationException
----------------------------------------------------------------------------

         Key: IBATISNET-68
         URL: http://issues.apache.org/jira/browse/IBATISNET-68
     Project: iBatis for .NET
        Type: Bug
    Reporter: Ron Grabowski
 Assigned to: Gilles Bayon 
    Priority: Trivial


As of 5/21/2005, the 'Load TypeHandlers' region in 
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder contains the following code:

foreach (XmlNode xmlNode in 
_configScope.SqlMapConfigDocument.SelectNodes("/sqlMapConfig/typeHandlers/typeHandler"))
{
 try
 {
  /* snip */
 } 
 catch (Exception e) 
 {
  throw new ConfigurationException("Error registering occurred.  Cause: " + 
e.Message, e);
 }
}

The ConfigurationException is missing the what item failed to register.

A simple fix would be to use the general term TypeHandler:

  throw new ConfigurationException("Error registering custom TypeHandler 
occurred.  Cause: " + e.Message, e);

A longer fix would be to store attributes of the current typeHandler before 
going into the try/catch block and put those in the exception message:

  throw new ConfigurationException("Error registering TypeHandler class \"{0}\" 
for handling .Net type \"{1}\" and dbType \"{2}\".  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

Reply via email to