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/22 06:07:52 UTC

[jira] Created: (IBATISNET-68) '#region Load TypeHandlers' has incorrect message for ConfigurationException

'#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


[jira] Closed: (IBATISNET-68) '#region Load TypeHandlers' has incorrect message for ConfigurationException

Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATISNET-68?page=all ]
     
Gilles Bayon closed IBATISNET-68:
---------------------------------

     Resolution: Fixed
    Fix Version: DataMapper 1.2

In SVN

> '#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
>     Assignee: Gilles Bayon
>     Priority: Trivial
>      Fix For: DataMapper 1.2

>
> 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