From: Peter S. <sz...@us...> - 2004-09-21 12:43:37
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13190 Modified Files: ADOException.cs AssertionFailure.cs CallbackException.cs InstantiationException.cs LazyInitializationException.cs MappingException.cs ObjectDeletedException.cs ObjectNotFoundException.cs ValidationFailure.cs Log Message: Some more exception constructor. Index: ObjectDeletedException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectDeletedException.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ObjectDeletedException.cs 13 Sep 2004 05:37:37 -0000 1.2 --- ObjectDeletedException.cs 21 Sep 2004 12:43:26 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 25,28 **** --- 26,39 ---- get { return base.Message + ": " + identifier; } } + + public ObjectDeletedException(string msg, Exception root) : this(msg, root.Message) {} + + public ObjectDeletedException(string msg) : this(msg, msg) {} + + public ObjectDeletedException(Exception root) : this(root.Message, root.Message) {} + + public ObjectDeletedException() : this(string.Empty, string.Empty) {} + + protected ObjectDeletedException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } Index: CallbackException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/CallbackException.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CallbackException.cs 20 Sep 2004 17:49:25 -0000 1.3 --- CallbackException.cs 21 Sep 2004 12:43:26 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 13,16 **** --- 14,19 ---- public CallbackException(string message, Exception e) : base(message, e) {} + + protected CallbackException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } Index: InstantiationException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/InstantiationException.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InstantiationException.cs 13 Sep 2004 05:37:37 -0000 1.2 --- InstantiationException.cs 21 Sep 2004 12:43:26 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 25,28 **** --- 26,37 ---- get { return base.Message + type.FullName; } } + + public InstantiationException(string s, Exception root) : this(s, typeof(InstantiationException), root) {} + + public InstantiationException(string s) : this(s, typeof(InstantiationException), new InvalidOperationException("Invalid Operation")) {} + + public InstantiationException() : this("Exception occured", typeof(InstantiationException), new InvalidOperationException("Invalid Operation")) {} + + protected InstantiationException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } Index: ADOException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ADOException.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ADOException.cs 20 Sep 2004 17:49:25 -0000 1.5 --- ADOException.cs 21 Sep 2004 12:43:26 -0000 1.6 *************** *** 1,4 **** --- 1,5 ---- using System; using System.Data; + using System.Runtime.Serialization; namespace NHibernate *************** *** 14,17 **** --- 15,20 ---- public ADOException() : this("DataException occured", new InvalidOperationException("Invalid Operation")) { } + public ADOException(string str) : this(str, new InvalidOperationException("Invalid Operation")) { } + public ADOException(DataException root) : this("DataException occurred", root) { } *************** *** 22,25 **** --- 25,30 ---- } + protected ADOException(SerializationInfo info, StreamingContext context) : base(info, context) { } + } } Index: ObjectNotFoundException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ObjectNotFoundException.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ObjectNotFoundException.cs 13 Sep 2004 05:37:37 -0000 1.2 --- ObjectNotFoundException.cs 21 Sep 2004 12:43:26 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 33,36 **** --- 34,44 ---- get { return type; } } + public ObjectNotFoundException(string msg, Exception root) : this(msg, root.Message, typeof(ObjectNotFoundException)) {} + + public ObjectNotFoundException(string msg) : this(msg, msg, typeof(ObjectNotFoundException)) {} + + public ObjectNotFoundException(Exception root) : this(root.Message, root.Message, typeof(ObjectNotFoundException)) {} + + protected ObjectNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } Index: MappingException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/MappingException.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MappingException.cs 13 Sep 2004 05:37:37 -0000 1.3 --- MappingException.cs 21 Sep 2004 12:43:26 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 15,18 **** --- 16,23 ---- public MappingException(string msg) : base(msg) {} + + public MappingException() : base() {} + + protected MappingException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } Index: AssertionFailure.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/AssertionFailure.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AssertionFailure.cs 20 Sep 2004 17:49:25 -0000 1.3 --- AssertionFailure.cs 21 Sep 2004 12:43:26 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 23,26 **** --- 24,29 ---- log4net.LogManager.GetLogger( typeof(AssertionFailure) ).Error("An AssertionFailure occured - this may indicate a bug in NHibernate", e); } + + protected AssertionFailure(SerializationInfo info, StreamingContext context) : base(info, context) { } } } Index: ValidationFailure.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ValidationFailure.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ValidationFailure.cs 13 Sep 2004 05:37:37 -0000 1.2 --- ValidationFailure.cs 21 Sep 2004 12:43:26 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 15,18 **** --- 16,23 ---- public ValidationFailure(Exception e) : base("A validation failure occured", e) {} + + public ValidationFailure() : base("A validation failure occured") {} + + protected ValidationFailure(SerializationInfo info, StreamingContext context) : base(info, context) { } } } Index: LazyInitializationException.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/LazyInitializationException.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LazyInitializationException.cs 13 Sep 2004 05:37:37 -0000 1.3 --- LazyInitializationException.cs 21 Sep 2004 12:43:26 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Runtime.Serialization; namespace NHibernate *************** *** 10,14 **** public class LazyInitializationException : Exception { ! public LazyInitializationException(Exception root) : base("Hibernate lazy instantiation problem", root) {} public LazyInitializationException(string msg) : base(msg) --- 11,15 ---- public class LazyInitializationException : Exception { ! public LazyInitializationException(Exception root) : this(root.Message) {} public LazyInitializationException(string msg) : base(msg) *************** *** 17,21 **** } ! public LazyInitializationException(string msg, Exception root) : base(msg, root) { } } --- 18,26 ---- } ! public LazyInitializationException(string msg, Exception root) : this(msg + " " + root.Message) {} ! ! public LazyInitializationException() : this("LazyInitalizationException") {} ! ! protected LazyInitializationException(SerializationInfo info, StreamingContext context) : base(info, context) { } } |