1 From 59f63233908b8ccee70251f698351014546d5765 Mon Sep 17 00:00:00 2001
2 From: Gabriel Burt <gabriel.burt@gmail.com>
3 Date: Thu, 07 Jan 2010 01:08:34 +0000
4 Subject: Update to build against Mono.Data.Sqlite 2.x
7 index 9470a0a..82f7752 100644
8 --- a/Util/FSpotTools.cs
9 +++ b/Util/FSpotTools.cs
10 @@ -85,8 +85,12 @@ namespace Beagle.Util {
11 while (reader == null) {
13 reader = command.ExecuteReader ();
14 - } catch (SqliteBusyException) {
16 + } catch (SqliteException e) {
17 + if (e.ErrorCode == SQLiteErrorCode.Busy) {
25 index f4be4c6..f747db5 100644
26 --- a/beagled/SqliteUtils.cs
27 +++ b/beagled/SqliteUtils.cs
28 @@ -55,8 +55,13 @@ namespace Beagle.Util {
30 ret = command.ExecuteNonQuery ();
32 - } catch (SqliteBusyException ex) {
34 + } catch (SqliteException ex) {
35 + if (ex.ErrorCode == SQLiteErrorCode.Busy) {
38 + Log.Error (ex, "SQL that caused the exception: {0}", command_text);
41 } catch (Exception e) {
42 Log.Error (e, "SQL that caused the exception: {0}", command_text);
44 @@ -79,8 +84,13 @@ namespace Beagle.Util {
46 ret = command.ExecuteNonQuery ();
48 - } catch (SqliteBusyException ex) {
50 + } catch (SqliteException ex) {
51 + if (ex.ErrorCode == SQLiteErrorCode.Busy) {
54 + Log.Error (ex, "SQL that caused the exception: {0}", command.CommandText);
57 } catch (Exception e) {
58 Log.Error ( e, "SQL that caused the exception: {0}", command.CommandText);
60 @@ -96,8 +106,12 @@ namespace Beagle.Util {
61 while (reader == null) {
63 reader = command.ExecuteReader ();
64 - } catch (SqliteBusyException ex) {
66 + } catch (SqliteException ex) {
67 + if (ex.ErrorCode == SQLiteErrorCode.Busy) {
75 @@ -108,8 +122,12 @@ namespace Beagle.Util {
78 return reader.Read ();
79 - } catch (SqliteBusyException ex) {
81 + } catch (SqliteException ex) {
82 + if (ex.ErrorCode == SQLiteErrorCode.Busy) {