forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathADOException.cs
30 lines (23 loc) · 916 Bytes
/
ADOException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Data;
using System.Runtime.Serialization;
namespace NHibernate
{
/// <summary>
/// Wraps an <c>DataException</c>. Indicates that an exception occurred during an ADO.NET call.
/// </summary>
[Serializable]
public class ADOException : HibernateException
{
private Exception sqle;
public ADOException() : this("DataException occured", new InvalidOperationException("Invalid Operation")) { }
public ADOException(string message) : this(message, new InvalidOperationException("Invalid Operation")) { }
public ADOException(DataException root) : this("DataException occurred", root) { }
public ADOException(string message, Exception root) : base(message, root)
{
sqle = root;
log4net.LogManager.GetLogger( typeof(ADOException) ).Error(message, root);
}
protected ADOException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
}