-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d08aac0
commit 11be2c2
Showing
23 changed files
with
233 additions
and
66 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
4 changes: 2 additions & 2 deletions
4
...ntegrationTest/kotlin/io/embrace/android/embracesdk/assertions/InternalErrorAssertions.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
42 changes: 42 additions & 0 deletions
42
...id-sdk/src/main/java/io/embrace/android/embracesdk/internal/payload/ExceptionErrorInfo.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,42 @@ | ||
package io.embrace.android.embracesdk.internal.payload | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
/** | ||
* | ||
* | ||
* @param timestamp The timestamp in milliseconds of when an error happened. Previous name: s.e.rep.ts | ||
* @param appState The app state at the time of the error (foreground/background). Previous name: s.e.rep.s | ||
* @param exceptions A list of exceptions. Previous name: s.e.rep.ex | ||
*/ | ||
@JsonClass(generateAdapter = true) | ||
internal data class ExceptionErrorInfo( | ||
|
||
/* The timestamp in milliseconds of when an error happened. Previous name: s.e.rep.ts */ | ||
@Json(name = "timestamp") | ||
val timestamp: Long? = null, | ||
|
||
/* The app state at the time of the error (foreground/background). Previous name: s.e.rep.s */ | ||
@Json(name = "app_state") | ||
val appState: AppState? = null, | ||
|
||
/* A list of exceptions. Previous name: s.e.rep.ex */ | ||
@Json(name = "exceptions") | ||
val exceptions: List<ExceptionInfo>? = null | ||
|
||
) { | ||
|
||
/** | ||
* The app state at the time of the error (foreground/background). Previous name: s.e.rep.s | ||
* | ||
* Values: ACTIVE,BACKGROUND | ||
*/ | ||
internal enum class AppState(val value: String) { | ||
@Json(name = "active") | ||
ACTIVE("active"), | ||
|
||
@Json(name = "background") | ||
BACKGROUND("background") | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...android-sdk/src/main/java/io/embrace/android/embracesdk/internal/payload/ExceptionInfo.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,28 @@ | ||
package io.embrace.android.embracesdk.internal.payload | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
/** | ||
* Describes a Java exception. | ||
* | ||
* @param name The name of the class causing an error. Previous name: s.e.rep.ex.n | ||
* @param message The error message, if any. Previous name: s.e.rep.ex.m | ||
* @param stacktrace String representation of each line in the stack trace. Previous name: s.e.rep.ex.tt | ||
*/ | ||
@JsonClass(generateAdapter = true) | ||
internal data class ExceptionInfo( | ||
|
||
/* The name of the class causing an error. Previous name: s.e.rep.ex.n */ | ||
@Json(name = "name") | ||
val name: String? = null, | ||
|
||
/* The error message, if any. Previous name: s.e.rep.ex.m */ | ||
@Json(name = "message") | ||
val message: String? = null, | ||
|
||
/* String representation of each line in the stack trace. Previous name: s.e.rep.ex.tt */ | ||
@Json(name = "stacktrace") | ||
val stacktrace: List<String>? = null | ||
|
||
) |
23 changes: 23 additions & 0 deletions
23
...android-sdk/src/main/java/io/embrace/android/embracesdk/internal/payload/InternalError.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,23 @@ | ||
package io.embrace.android.embracesdk.internal.payload | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
/** | ||
* Describes an Exception Error with a count of occurrences and a list of exceptions (causes). | ||
* | ||
* @param count The number of internal error that occurred within Embrace. Previous name: s.e.c | ||
* @param errors A list of causes of the internal error. Previous name: s.e.rep | ||
*/ | ||
@JsonClass(generateAdapter = true) | ||
internal data class InternalError( | ||
|
||
/* The number of internal error that occurred within Embrace. Previous name: s.e.c */ | ||
@Json(name = "count") | ||
val count: Int? = null, | ||
|
||
/* A list of causes of the internal error. Previous name: s.e.rep */ | ||
@Json(name = "errors") | ||
val errors: List<ExceptionErrorInfo>? = null | ||
|
||
) |
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
4 changes: 2 additions & 2 deletions
4
...e-android-sdk/src/main/java/io/embrace/android/embracesdk/logging/InternalErrorService.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package io.embrace.android.embracesdk.logging | ||
|
||
import io.embrace.android.embracesdk.config.ConfigService | ||
import io.embrace.android.embracesdk.payload.ExceptionError | ||
import io.embrace.android.embracesdk.payload.LegacyExceptionError | ||
|
||
internal interface InternalErrorService { | ||
fun setConfigService(configService: ConfigService?) | ||
fun handleInternalError(throwable: Throwable) | ||
fun resetExceptionErrorObject() | ||
val currentExceptionError: ExceptionError? | ||
val currentExceptionError: LegacyExceptionError? | ||
} |
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
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
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
Oops, something went wrong.