From: Michael D. <mik...@us...> - 2005-01-17 22:30:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30603/NHibernate/Persister Modified Files: EntityPersister.cs NormalizedEntityPersister.cs Log Message: improved error messages around bad discriminator values. Index: NormalizedEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/NormalizedEntityPersister.cs,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** NormalizedEntityPersister.cs 17 Jan 2005 03:40:58 -0000 1.38 --- NormalizedEntityPersister.cs 17 Jan 2005 22:30:39 -0000 1.39 *************** *** 182,186 **** catch( Exception e ) { ! throw new MappingException( "could not format discriminator value to SQL string", e ); } } --- 182,186 ---- catch( Exception e ) { ! throw new MappingException( "Could not format discriminator value '0' to sql string using the IType NHibernate.Types.Int32Type", e ); } } Index: EntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/EntityPersister.cs,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** EntityPersister.cs 31 Dec 2004 21:49:23 -0000 1.34 --- EntityPersister.cs 17 Jan 2005 22:30:36 -0000 1.35 *************** *** 125,129 **** catch( Exception e ) { ! throw new MappingException( "Could not format discriminator value to sql string", e ); } --- 125,133 ---- catch( Exception e ) { ! string msg = String.Format( "Could not format discriminator value '{0}' to sql string using the IType {1}", ! model.DiscriminatorValue, ! model.Discriminator.Type.ToString() ); ! ! throw new MappingException( msg , e ); } |