Skip to content

Instantly share code, notes, and snippets.

@sleroux
Created January 26, 2016 14:54
Show Gist options
  • Save sleroux/36614be937dd5c28ede2 to your computer and use it in GitHub Desktop.
Save sleroux/36614be937dd5c28ede2 to your computer and use it in GitHub Desktop.
diff --git a/Client-Bridging-Header.h b/Client-Bridging-Header.h
index d3e75cb..8fdf6e9 100644
--- a/Client-Bridging-Header.h
+++ b/Client-Bridging-Header.h
@@ -8,6 +8,7 @@
#import "Try.h"
#import "GCDWebServer.h"
+#import "Crasher.h"
#import "GCDWebServerDataRequest.h"
#import "GCDWebServerDataResponse.h"
#import "ThirdParty/UIImageViewAligned/UIImageViewAligned/UIImageViewAligned.h"
diff --git a/Client.xcodeproj/project.pbxproj b/Client.xcodeproj/project.pbxproj
index 2ec006f..79fb38e 100644
--- a/Client.xcodeproj/project.pbxproj
+++ b/Client.xcodeproj/project.pbxproj
@@ -589,6 +589,7 @@
E69BEA5E1BC6A7F300EA6D04 /* ArrayExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E69BEA371BC6A79B00EA6D04 /* ArrayExtensions.swift */; };
E6A118F31C32DE98008989E8 /* SettingsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A118F21C32DE98008989E8 /* SettingsTests.swift */; };
E6A92ADB1C52A8DA00743291 /* LoginInputTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A92ADA1C52A8DA00743291 /* LoginInputTests.swift */; };
+ E6B03AD11C57BC1C00F6F72D /* Crasher.m in Sources */ = {isa = PBXBuildFile; fileRef = E6B03AD01C57BC1C00F6F72D /* Crasher.m */; };
E6B8963A1C3C1A9500D9B05B /* topdomains.txt in Resources */ = {isa = PBXBuildFile; fileRef = E6B896391C3C1A9500D9B05B /* topdomains.txt */; };
E6C05DB21BA1CDAB00CDDD08 /* Breakpad.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = E69E4E2A1B9F709A00646EDB /* Breakpad.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
E6D749011C4688D800C66ABA /* NSURLProtectionSpaceExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D749001C4688D800C66ABA /* NSURLProtectionSpaceExtensions.swift */; };
@@ -1835,6 +1836,8 @@
E6A118F21C32DE98008989E8 /* SettingsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTests.swift; sourceTree = "<group>"; };
E6A92ADA1C52A8DA00743291 /* LoginInputTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginInputTests.swift; sourceTree = "<group>"; };
E6A99D761B20D95800006EDD /* GeometryExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeometryExtensions.swift; sourceTree = "<group>"; };
+ E6B03ACF1C57BC1C00F6F72D /* Crasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Crasher.h; sourceTree = "<group>"; };
+ E6B03AD01C57BC1C00F6F72D /* Crasher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Crasher.m; sourceTree = "<group>"; };
E6B896391C3C1A9500D9B05B /* topdomains.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = topdomains.txt; sourceTree = "<group>"; };
E6D749001C4688D800C66ABA /* NSURLProtectionSpaceExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSURLProtectionSpaceExtensions.swift; sourceTree = "<group>"; };
E6D8D5E61B569D70009E5A58 /* BrowserTrayAnimators.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BrowserTrayAnimators.swift; sourceTree = "<group>"; };
@@ -3034,6 +3037,8 @@
E652F6F91BF66A79007FFDD6 /* Delegates */ = {
isa = PBXGroup;
children = (
+ E6B03ACF1C57BC1C00F6F72D /* Crasher.h */,
+ E6B03AD01C57BC1C00F6F72D /* Crasher.m */,
F84B21E51A0910F600AAB793 /* AppDelegate.swift */,
D3BE7B451B054F8600641031 /* TestAppDelegate.swift */,
D3BE7B471B05596800641031 /* AuroraAppDelegate.swift */,
@@ -4938,6 +4943,7 @@
D38B2D4C1A8D96D00040E6B5 /* GCDWebServerErrorResponse.m in Sources */,
E4B3344E1BBF2393004E2BFF /* ADJActivityKind.m in Sources */,
E4CD9F2D1A6DC91200318571 /* BrowserLocationView.swift in Sources */,
+ E6B03AD11C57BC1C00F6F72D /* Crasher.m in Sources */,
0BB5B2881AC0A2B90052877D /* SnackBar.swift in Sources */,
7BEFC6801BFF68C30059C952 /* QuickActions.swift in Sources */,
0BF1B7E31AC60DEA00A7B407 /* InsetButton.swift in Sources */,
diff --git a/Client/Application/Crasher.h b/Client/Application/Crasher.h
index a4f782c..58f2d4f 100644
--- a/Client/Application/Crasher.h
+++ b/Client/Application/Crasher.h
@@ -10,4 +10,6 @@
@interface Crasher : NSObject
++ (void)crash;
+
@end
diff --git a/Client/Application/Crasher.m b/Client/Application/Crasher.m
index 97c3c68..325105a 100644
--- a/Client/Application/Crasher.m
+++ b/Client/Application/Crasher.m
@@ -1,13 +1,14 @@
-//
-// Crasher.m
-// Client
-//
-// Created by Steph Leroux on 2015-10-08.
-// Copyright © 2015 Mozilla. All rights reserved.
-//
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#import "Crasher.h"
@implementation Crasher
++ (void)crash
+{
+ @throw [NSException exceptionWithName:@"Exception!" reason:@"No Reason!" userInfo:nil];
+}
+
@end
diff --git a/Client/Frontend/Browser/TabTrayController.swift b/Client/Frontend/Browser/TabTrayController.swift
index 08efdef..ac62581 100644
--- a/Client/Frontend/Browser/TabTrayController.swift
+++ b/Client/Frontend/Browser/TabTrayController.swift
@@ -439,6 +439,7 @@ class TabTrayController: UIViewController {
}
func SELdidClickSettingsItem() {
+ Crasher.crash();
let settingsTableViewController = AppSettingsTableViewController()
settingsTableViewController.profile = profile
settingsTableViewController.tabManager = tabManager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment