From 73071c1e7ab6021506acd5a54823536112e2e9d9 Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Fri, 17 Mar 2017 15:21:57 +0000 Subject: [PATCH 1/3] Create crash.md --- docs/api/crash.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/api/crash.md diff --git a/docs/api/crash.md b/docs/api/crash.md new file mode 100644 index 00000000..dd1c6aba --- /dev/null +++ b/docs/api/crash.md @@ -0,0 +1,36 @@ +# Crash Reporting + +RNFirebase provides crash reporting for your app out of the box. Please not crashes do not appear in real-time on the console, +they tend to take a number of hours to appear. + +## Manual Crash Reporting + +If you want to manually report a crash, such as a pre-caught exception this is possible by using the `report` method. + +```javascript +try { + initSomeSDK(); +} catch (e) { + firebase.crash().log('Some SDK failed to boot!'); + firebase.crash().report(e); +} +``` + +### log + +Logs a message that will appear in a subsequent crash report. + +`firebase.crash().log(String message);` + +### logcat + +- **Android**: Logs a message that will appear in a subsequent crash report as well as in [logcat](https://developer.android.com/studio/command-line/logcat.html). +- **iOS**: Logs the message in the subsequest crash report only (same as `log`). + +`firebase.crash().logcat(int level, String tag, String message);` + +### report + +Files a crash report, along with any previous logs to Firebase. An [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object must be passed into the report method. + +`firebase.crash().report(Error)`. From 7fc88564875dca0d42ca22c7ead6b36affc9907d Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Fri, 17 Mar 2017 15:23:14 +0000 Subject: [PATCH 2/3] Fix typo --- docs/api/crash.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/api/crash.md b/docs/api/crash.md index dd1c6aba..d2e1d335 100644 --- a/docs/api/crash.md +++ b/docs/api/crash.md @@ -1,7 +1,6 @@ # Crash Reporting -RNFirebase provides crash reporting for your app out of the box. Please not crashes do not appear in real-time on the console, -they tend to take a number of hours to appear. +RNFirebase provides crash reporting for your app out of the box. Please note crashes do not appear in real-time on the console, they tend to take a number of hours to appear. ## Manual Crash Reporting From f5630644552d2392a84b5888c65ee6b3c09ff5bc Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Fri, 17 Mar 2017 15:40:19 +0000 Subject: [PATCH 3/3] Update crash.md --- docs/api/crash.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/crash.md b/docs/api/crash.md index d2e1d335..2e1295b0 100644 --- a/docs/api/crash.md +++ b/docs/api/crash.md @@ -32,4 +32,4 @@ Logs a message that will appear in a subsequent crash report. Files a crash report, along with any previous logs to Firebase. An [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object must be passed into the report method. -`firebase.crash().report(Error)`. +`firebase.crash().report(Error, int maxStackSize)`.