forked from weimingtom/CsharpSQLite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQLiteExceptions.cs
More file actions
executable file
·80 lines (70 loc) · 1.62 KB
/
SQLiteExceptions.cs
File metadata and controls
executable file
·80 lines (70 loc) · 1.62 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SQLite
{
//This is the base exception of all sqlite exceptions
public class SQLiteException : DbException
{
public int SqliteErrorCode { get; protected set; }
public SQLiteException(int errcode)
: this(errcode, string.Empty)
{
}
public SQLiteException(int errcode, string message)
: base(message)
{
SqliteErrorCode = errcode;
}
public SQLiteException(string message)
: this(0, message)
{
}
}
// This exception is raised whenever a statement cannot be compiled.
public class SQLiteSyntaxException : SQLiteException
{
public SQLiteSyntaxException(int errcode)
: base(errcode)
{
}
public SQLiteSyntaxException(int errcode, string message)
: base(errcode, message)
{
}
public SQLiteSyntaxException(string message)
: base(message)
{
}
}
// This exception is raised whenever the execution
// of a statement fails.
public class SQLiteExecutionException : SQLiteException
{
public SQLiteExecutionException()
: base(0)
{
}
public SQLiteExecutionException(int errcode)
: base(errcode)
{
}
public SQLiteExecutionException(int errcode, string message)
: base(errcode, message)
{
}
public SQLiteExecutionException(string message)
: base(message)
{
}
}
// This exception is raised whenever Sqlite says it
// cannot run a command because something is busy.
public class SQLiteBusyException : SQLiteException
{
public SQLiteBusyException()
: base(0)
{
}
}
}