Skip to content

Commit e7c8a0b

Browse files
committed
Merge branch 'fix-exception'
2 parents c1c456b + 52bea3d commit e7c8a0b

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

Src/LookupUtility/Application/SharePointApplicationService.cs

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace BizTalkComponents.Utilities.LookupUtility.Application
1010
{
1111
public class SharePointApplicationService : IApplicationService
1212
{
13-
private LookupUtilityService svc;
14-
13+
private LookupUtilityService svc;
14+
1515
public SharePointApplicationService()
1616
{
1717
//Todo: Check if code is run from Visual Studio or BizTalk.
@@ -28,12 +28,36 @@ public SharePointApplicationService()
2828
}
2929
public string GetValue(string list, string key, bool throwIfNotExists = false, bool allowDefaults = false)
3030
{
31-
return svc.GetValue(list, key, throwIfNotExists, allowDefaults);
31+
string value;
32+
33+
try
34+
{
35+
value = svc.GetValue(list, key, throwIfNotExists, allowDefaults);
36+
}
37+
catch (Exception ex)
38+
{
39+
Trace.WriteLine(string.Format("An exception was thrown in LookupUtility {0}", ex.ToString()));
40+
throw ex;
41+
}
42+
43+
return value;
3244
}
3345

3446
public string GetValue(string list, string key, string defaultValue)
3547
{
36-
return svc.GetValue(list, key, defaultValue);
48+
string value;
49+
50+
try
51+
{
52+
value = svc.GetValue(list, key, defaultValue);
53+
}
54+
catch (Exception ex)
55+
{
56+
Trace.WriteLine(string.Format("An exception was thrown in LookupUtility {0}", ex.ToString()));
57+
throw ex;
58+
}
59+
60+
return value;
3761
}
3862
}
3963
}

0 commit comments

Comments
 (0)