Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26812/NHibernate/Persister
Modified Files:
EntityPersister.cs NormalizedEntityPersister.cs
Log Message:
Modified how exceptions are rethrown - NH-153 and this blog
http://dotnetguy.techieswithcats.com/archives/004118.shtml
inspired effort.
Index: NormalizedEntityPersister.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/NormalizedEntityPersister.cs,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** NormalizedEntityPersister.cs 21 Nov 2004 22:56:29 -0000 1.34
--- NormalizedEntityPersister.cs 30 Nov 2004 18:36:51 -0000 1.35
***************
*** 965,969 ****
catch (Exception e)
{
! throw e;
}
finally
--- 965,970 ----
catch (Exception e)
{
! // TODO: log exception
! throw;
}
finally
***************
*** 1050,1057 ****
}
! //TODO: change this to SQLException catching and log it
catch( Exception e )
{
! throw e;
}
finally
--- 1051,1058 ----
}
! //TODO: change this to SQLException catching and log it
catch( Exception e )
{
! throw;
}
finally
***************
*** 1130,1137 ****
}
! //TODO: change this to SQLException and log it
catch (Exception e)
{
! throw e;
}
finally
--- 1131,1138 ----
}
! //TODO: change this to SQLException and log it
catch (Exception e)
{
! throw;
}
finally
***************
*** 1152,1159 ****
session.Batcher.ExecuteNonQuery( statement );
}
! //TODO: change this to SQLException and log it
catch ( Exception e)
{
! throw e;
}
finally
--- 1153,1160 ----
session.Batcher.ExecuteNonQuery( statement );
}
! //TODO: change this to SQLException and log it
catch ( Exception e)
{
! throw;
}
finally
***************
*** 1201,1207 ****
}
}
catch (Exception e)
{
! throw e;
}
finally
--- 1202,1210 ----
}
}
+ //TODO: change to SqlException
catch (Exception e)
{
! // TODO: log info
! throw;
}
finally
***************
*** 1305,1310 ****
}
// TODO: change to SQLException and log
! catch (Exception e) {
! throw e;
}
finally
--- 1308,1314 ----
}
// TODO: change to SQLException and log
! catch (Exception e)
! {
! throw;
}
finally
Index: EntityPersister.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/EntityPersister.cs,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** EntityPersister.cs 21 Nov 2004 22:56:29 -0000 1.31
--- EntityPersister.cs 30 Nov 2004 18:36:51 -0000 1.32
***************
*** 804,811 ****
}
! //TODO: add SQLException catching here...
catch (Exception e )
{
! throw e;
}
}
--- 804,812 ----
}
! //TODO: add SQLException catching here...
catch (Exception e )
{
! session.Batcher.AbortBatch( e );
! throw;
}
}
***************
*** 877,884 ****
return id;
}
! //TODO: add SQLException logging here
catch (Exception e)
{
! throw e;
}
finally
--- 878,886 ----
return id;
}
! //TODO: add SQLException logging here
catch (Exception e)
{
! // TODO: log it
! throw;
}
finally
***************
*** 936,943 ****
}
}
! // TODO: h2.0.3 - add some Sql Exception logging here
catch (Exception e)
{
! throw e;
}
finally
--- 938,953 ----
}
}
! // TODO: h2.0.3 - add some Sql Exception logging here
catch (Exception e)
{
! if( IsVersioned )
! {
! //TODO: add some logging.
! }
! else
! {
! session.Batcher.AbortBatch( e );
! }
! throw;
}
finally
***************
*** 1045,1049 ****
}
! throw e;
}
finally
--- 1055,1059 ----
}
! throw;
}
finally
|