--- beagle-0.3.9/Util/FSpotTools.cs.orig 2010-01-30 14:45:38.000000000 +0100 +++ beagle-0.3.9/Util/FSpotTools.cs 2010-01-30 14:47:00.000000000 +0100 @@ -85,8 +85,12 @@ while (reader == null) { try { reader = command.ExecuteReader (); - } catch (SqliteBusyException) { - Thread.Sleep (50); + } catch (SqliteException e) { + if (e.ErrorCode == SQLiteErrorCode.Busy) { + Thread.Sleep (50); + } else { + throw; + } } } reader.Close (); --- beagle-0.3.9/beagled/SqliteUtils.cs.orig 2010-01-30 14:47:14.000000000 +0100 +++ beagle-0.3.9/beagled/SqliteUtils.cs 2010-01-30 14:53:16.000000000 +0100 @@ -55,8 +55,13 @@ try { ret = command.ExecuteNonQuery (); break; - } catch (SqliteBusyException ex) { - Thread.Sleep (50); + } catch (SqliteException ex) { + if (ex.ErrorCode == SQLiteErrorCode.Busy) { + Thread.Sleep (50); + } else { + Log.Error(ex, "SQL that caused the exception: {0}", command_text); + throw; + } } catch (Exception e) { Log.Error (e, "SQL that caused the exception: {0}", command_text); throw; @@ -79,8 +84,13 @@ try { ret = command.ExecuteNonQuery (); break; - } catch (SqliteBusyException ex) { - Thread.Sleep (50); + } catch (SqliteException ex) { + if (ex.ErrorCode == SQLiteErrorCode.Busy) { + Thread.Sleep (50); + } else { + Log.Error(ex, "SQL that caused the exception: {0}", command.CommandText); + throw; + } } catch (Exception e) { Log.Error ( e, "SQL that caused the exception: {0}", command.CommandText); throw; @@ -96,8 +106,12 @@ while (reader == null) { try { reader = command.ExecuteReader (); - } catch (SqliteBusyException ex) { - Thread.Sleep (50); + } catch (SqliteException ex) { + if (ex.ErrorCode == SQLiteErrorCode.Busy) { + Thread.Sleep (50); + } else { + throw; + } } } return reader; @@ -108,8 +122,12 @@ while (true) { try { return reader.Read (); - } catch (SqliteBusyException ex) { - Thread.Sleep (50); + } catch (SqliteException ex) { + if (ex.ErrorCode == SQLiteErrorCode.Busy) { + Thread.Sleep (50); + } else { + throw; + } } } }