From: Peter S. <sz...@us...> - 2004-09-20 17:49:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25309 Modified Files: ADOException.cs AssertionFailure.cs CallbackException.cs HibernateException.cs Log Message: Added some more constructors to exceptions to act more like .NET does Index: CallbackException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/CallbackException.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CallbackException.cs 13 Sep 2004 05:37:37 -0000 1.2 --- CallbackException.cs 20 Sep 2004 17:49:25 -0000 1.3 *************** *** 6,9 **** --- 6,11 ---- public class CallbackException : HibernateException { + public CallbackException() : base("An exception occured in a callback") {} + public CallbackException(Exception root) : base("An exception occured in a callback", root) {} Index: AssertionFailure.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/AssertionFailure.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AssertionFailure.cs 13 Sep 2004 05:37:37 -0000 1.2 --- AssertionFailure.cs 20 Sep 2004 17:49:25 -0000 1.3 *************** *** 9,12 **** --- 9,17 ---- public class AssertionFailure : ApplicationException { + public AssertionFailure() : base(String.Empty) + { + log4net.LogManager.GetLogger( typeof(AssertionFailure) ).Error("An AssertionFailure occured - this may indicate a bug in NHibernate"); + } + public AssertionFailure(string s) : base(s) { Index: ADOException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ADOException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ADOException.cs 13 Sep 2004 05:37:37 -0000 1.4 --- ADOException.cs 20 Sep 2004 17:49:25 -0000 1.5 *************** *** 12,15 **** --- 12,17 ---- private Exception sqle; + public ADOException() : this("DataException occured", new InvalidOperationException("Invalid Operation")) { } + public ADOException(DataException root) : this("DataException occurred", root) { } Index: HibernateException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/HibernateException.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HibernateException.cs 13 Sep 2004 05:37:37 -0000 1.4 --- HibernateException.cs 20 Sep 2004 17:49:25 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 11,14 **** --- 12,17 ---- public class HibernateException : ApplicationException { + public HibernateException() : base (String.Empty) { } + public HibernateException(Exception e) : base(String.Empty, e) { } *************** *** 16,19 **** --- 19,24 ---- public HibernateException(string str) : base(str) { } + + protected HibernateException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } |