-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from Automattic/add/js-exception-logging
Add support to send JS exceptions to Sentry
- Loading branch information
Showing
5 changed files
with
109 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
22 changes: 22 additions & 0 deletions
22
AutomatticTracks/src/main/java/com/automattic/android/tracks/crashlogging/JsException.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.automattic.android.tracks.crashlogging | ||
|
||
data class JsException( | ||
val type: String, | ||
val message: String, | ||
var stackTrace: List<JsExceptionStackTraceElement>, | ||
val context: Map<String, Any>, | ||
val tags: Map<String, String>, | ||
val isHandled: Boolean, | ||
val handledBy: String | ||
) | ||
|
||
data class JsExceptionStackTraceElement( | ||
val fileName: String?, | ||
val lineNumber: Int?, | ||
val colNumber: Int?, | ||
val function: String | ||
) | ||
|
||
interface JsExceptionCallback { | ||
fun onReportSent(sent: Boolean) | ||
} |
This file contains 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
This file contains 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
This file contains 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