Skip to content

Commit

Permalink
Improving crash reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike James committed Jun 20, 2016
1 parent 439dc9c commit 5449dc5
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 51 deletions.
5 changes: 5 additions & 0 deletions ClientSDKs/BeerDrinkin.Services.Abstractions/ILogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ public interface ILogService

void Report(Exception exception);
void Report(Exception exception, IList<string> tags);

void Report(Exception exception, string viewController, string method, string comment);

void Report(Exception exception, string viewController, string method);

}
}
17 changes: 17 additions & 0 deletions MobileApps/Forms/BeerDrinkin.Forms/BeerDrinkin.Forms.Core.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeerDrinkin.Forms.Core", "BeerDrinkin.Forms.Core.csproj", "{C5BCCF93-1D58-4838-B6B4-6F9D9D232EC5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5BCCF93-1D58-4838-B6B4-6F9D9D232EC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5BCCF93-1D58-4838-B6B4-6F9D9D232EC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5BCCF93-1D58-4838-B6B4-6F9D9D232EC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5BCCF93-1D58-4838-B6B4-6F9D9D232EC5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions MobileApps/iOS/BeerDrinkin.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@
<BundleResource Include="Resources\inAppPurhcase_tick.png" />
<BundleResource Include="Resources\search_inAppPurcahsePadlock.png" />
<BundleResource Include="Resources\search_ocr.png" />
<BundleResource Include="Resources\intro_location_map.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Properties\_SettingsStarted.txt" />
Expand Down
19 changes: 18 additions & 1 deletion MobileApps/iOS/Helpers/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,25 @@ public void Report(Exception exception)

public void Report(Exception exception, IList<string> tags)
{
RaygunClient.Current.Send(exception, tags);
RaygunClient.Current.SendInBackground(exception, tags);
}

public void Report(Exception exception, string viewController, string method, string comment = "")
{
var dict = new Dictionary<string, object>();
dict.Add("View Controller", viewController);
dict.Add("Method", method);
if(!string.IsNullOrEmpty(comment))
dict.Add("Comment", comment);

RaygunClient.Current.SendInBackground(exception, null, dict);
}

public void Report(Exception exception, string viewController, string method)
{
Report(exception, viewController, method, "");
}

}
}

4 changes: 2 additions & 2 deletions MobileApps/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@
</array>
<key>CFBundleShortVersionString</key>
<string>0.3</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>UIApplicationShortcutItems</key>
<array>
<dict>
Expand All @@ -107,5 +105,7 @@
<string>fetch</string>
<string>remote-notification</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
111 changes: 64 additions & 47 deletions MobileApps/iOS/Main.storyboard

Large diffs are not rendered by default.

Binary file added MobileApps/iOS/Resources/intro_location_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async Task Search(string searchTerm)
}
catch (Exception ex)
{
logger.Report(ex);
logger.Report(ex, "DiscoverViewController", "Search");
}
}

Expand Down

0 comments on commit 5449dc5

Please sign in to comment.