Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10714/src/NHibernate/Dialect
Modified Files:
TypeNames.cs
Log Message:
Throw an exception for unsupported DbTypes
Index: TypeNames.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/TypeNames.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TypeNames.cs 31 Dec 2004 17:07:24 -0000 1.5
--- TypeNames.cs 11 Feb 2005 20:22:25 -0000 1.6
***************
*** 1,2 ****
--- 1,3 ----
+ using System;
using System.Collections;
using System.Data;
***************
*** 60,64 ****
public string Get( DbType typecode )
{
! return ( string ) defaults[ typecode ];
}
--- 61,72 ----
public string Get( DbType typecode )
{
! string result = ( string ) defaults[ typecode ];
!
! if( result == null )
! {
! throw new ArgumentException("Dialect does not support DbType." + typecode,
! "typecode");
! }
! return result;
}
|