forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathADOException.cs
57 lines (51 loc) · 1.4 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Data;
using System.Runtime.Serialization;
using log4net;
namespace NHibernate
{
/// <summary>
/// Wraps exceptions that occur during ADO.NET calls. Exceptions thrown
/// by various ADO.NET providers are not derived from a common base class
/// (<c>SQLException</c> in Java), so just <c>Exception</c>
/// </summary>
[ Serializable ]
public class ADOException : HibernateException
{
/// <summary></summary>
public ADOException() : this( "DataException occured", new InvalidOperationException( "Invalid Operation" ) )
{
}
/// <summary>
///
/// </summary>
/// <param name="message"></param>
public ADOException( string message ) : this( message, new InvalidOperationException( "Invalid Operation" ) )
{
}
/// <summary>
///
/// </summary>
/// <param name="root"></param>
public ADOException( DataException root ) : this( "DataException occurred", root )
{
}
/// <summary>
///
/// </summary>
/// <param name="message"></param>
/// <param name="root"></param>
public ADOException( string message, Exception root ) : base( message, root )
{
LogManager.GetLogger( typeof( ADOException ) ).Error( message, root );
}
/// <summary>
///
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected ADOException( SerializationInfo info, StreamingContext context ) : base( info, context )
{
}
}
}