This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public App() | |
{ | |
BugSenseHandler.Instance.Init(this, "Your_API_Key"); | |
// You app's code | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
//Some code to execute | |
} | |
catch (Exception ex) { | |
BugSenseHandler.HandleError(ex); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
throw new InvalidOperationException("An exception occured while executing in a different thread."); | |
} | |
catch (Exception ex) { | |
BugSenseHandler.HandleError(ex, string.Format("Happend at user {0}", _user)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
throw new InvalidOperationException("An exception occured while executing in a different thread."); | |
} | |
catch (Exception ex) { | |
var overridenOptions = BugSenseHandler.DefaultOptions(); | |
overridenOptions.Text = ex.Message + Environment.NewLine + "Do you want to send the Exception?"; | |
overridenOptions.Type = enNotificationType.MessageBoxConfirm; | |
BugSenseHandler.HandleError(ex, string.Format("User {0}", _user), overridenOptions); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ "$UFW_OTHER_PLATFORM" = "iphonesimulator" ]] | |
then | |
xcodebuild -project "${PROJECT_FILE_PATH}" -target "${TARGET_NAME}" -configuration "${CONFIGURATION}" ARCHS=i386 -sdk ${UFW_OTHER_PLATFORM}${UFW_SDK_VERSION} BUILD_DIR="${BUILD_DIR}" CONFIGURATION_TEMP_DIR="${PROJECT_TEMP_DIR}/${CONFIGURATION}-${UFW_OTHER_PLATFORM}" $ACTION | |
else | |
xcodebuild -project "${PROJECT_FILE_PATH}" -target "${TARGET_NAME}" -configuration "${CONFIGURATION}" -sdk ${UFW_OTHER_PLATFORM}${UFW_SDK_VERSION} BUILD_DIR="${BUILD_DIR}" CONFIGURATION_TEMP_DIR="${PROJECT_TEMP_DIR}/${CONFIGURATION}-${UFW_OTHER_PLATFORM}" $ACTION | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ajaxError(function(event, xhr, settings, error) { | |
Bugsense.notify({ | |
request: xhr, | |
settings: settings, | |
error: error | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bugsense parameters (required) | |
this.defaults = { | |
apiKey: 'YOUR_API_KEY', // modify me | |
url: 'http://www.bugsense.com/api/js/errors?api_key=' // NON-SSL | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <BugSense-iOS/BugSenseCrashController.h> | |
// ... | |
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
//... | |
NSDictionary *myStuff = [NSDictionary dictionaryWithObjectsAndKeys:@"myObject", @"myKey", nil]; | |
[BugSenseCrashController sharedInstanceWithBugSenseAPIKey:@"<Your BugSense API Key>" | |
userDictionary:myStuff | |
sendImmediately:NO]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@try { | |
// some exception throwing code | |
} @catch (NSException *exc) { | |
BUGSENSE_LOG(exc, @"Tag"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String ReadInputStream(InputStream in) throws IOException { | |
StringBuffer stream = new StringBuffer(); | |
byte[] b = new byte[4096]; | |
for (int n; (n = in.read(b)) != -1;) { | |
stream.append(new String(b, 0, n)); | |
} | |
return stream.toString(); | |
} |