wasCSharpSQLite – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 using System;
2 using System.Data;
3 using System.Data.Common;
4  
5 namespace Community.CsharpSqlite.SQLiteClient
6 {
7 /// <summary>
8 /// Base exception for all Sqlite exceptions.
9 /// </summary>
10 public class SqliteException : DbException
11 {
12 public int SqliteErrorCode { get; protected set; }
13  
14 public SqliteException(int errcode)
15 : this(errcode, string.Empty)
16 {
17 }
18  
19 public SqliteException(int errcode, string message)
20 : base(message)
21 {
22 SqliteErrorCode = errcode;
23 }
24  
25 public SqliteException(string message)
26 : this(0, message)
27 {
28 }
29 }
30  
31 /// <summary>
32 /// The exception that is raised whenever a statement cannot be compiled.
33 /// </summary>
34 public class SqliteSyntaxException : SqliteException
35 {
36 public SqliteSyntaxException(int errcode)
37 : base(errcode)
38 {
39  
40 }
41 public SqliteSyntaxException(int errcode, string message)
42 : base(errcode, message)
43 {
44 }
45 public SqliteSyntaxException(string message)
46 : base(message)
47 {
48 }
49 }
50  
51 /// <summary>
52 /// The exception that is raised whenever the execution of a statement fails.
53 /// </summary>
54 public class SqliteExecutionException : SqliteException
55 {
56 public SqliteExecutionException()
57 : base(0)
58 {
59 }
60 public SqliteExecutionException(int errcode)
61 : base(errcode)
62 {
63 }
64 public SqliteExecutionException(int errcode, string message)
65 : base(errcode, message)
66 {
67 }
68 public SqliteExecutionException(string message)
69 : base(message)
70 {
71 }
72 }
73  
74 /// <summary>
75 /// The exception that is raised whenever Sqlite reports it cannot run a command due to being busy.
76 /// </summary>
77 public class SqliteBusyException : SqliteException
78 {
79 public SqliteBusyException()
80 : base(0)
81 {
82 }
83 }
84  
85 }