Revision 4ec636f6 trunk/Pithos.Core/FileState.cs

b/trunk/Pithos.Core/FileState.cs
14 14
using Pithos.Core.Agents;
15 15
using Pithos.Interfaces;
16 16
using Pithos.Network;
17
using log4net;
17 18

  
18 19
namespace Pithos.Core
19 20
{
......
28 29
    [ActiveRecord]
29 30
    public class FileState:ActiveRecordLinqBase<FileState>
30 31
    {
32
        private static readonly ILog Log = LogManager.GetLogger("FileState");
33
        
31 34
        private string _filePath;
32 35
        private IList<FileTag> _tags=new List<FileTag>();
33 36

  
......
90 93
            if (string.IsNullOrWhiteSpace(absolutePath))
91 94
                throw new ArgumentNullException("absolutePath");
92 95
            Contract.EndContractBlock();
93
            return Queryable.FirstOrDefault(s => s.FilePath == absolutePath.ToLower());
96
            try
97
            {
98
                return Queryable.FirstOrDefault(s => s.FilePath == absolutePath.ToLower());
99
            }
100
            catch (Exception ex)
101
            {
102
                Log.Error(ex.ToString());
103
                throw;
104
            }
105
                
106

  
94 107
        }
95 108

  
96 109
        public static void DeleteByFilePath(string absolutePath)

Also available in: Unified diff