Skip to content

Commit

Permalink
Better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Jul 10, 2011
1 parent bc3d6d4 commit bb3eb78
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Raven.Database/Indexing/Index.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,23 @@ public void Dispose()
{
IndexWriter writer = indexWriter;
indexWriter = null;
writer.Close();
try
{
writer.Close();
}
catch (Exception e)
{
logIndexing.ErrorException("Error when closing the index", e);
}
}
try
{
directory.Close();
}
catch (Exception e)
{
logIndexing.ErrorException("Error when closing the directory", e);
}
directory.Close();
}
}

Expand Down

0 comments on commit bb3eb78

Please sign in to comment.