forked from Ashinch/ReadYou
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(infrastructure): add except BusinessException case for crash han…
…dle (Ashinch#651)
- Loading branch information
Showing
9 changed files
with
115 additions
and
34 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
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
14 changes: 14 additions & 0 deletions
14
app/src/main/java/me/ash/reader/infrastructure/exception/BusinessException.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,14 @@ | ||
package me.ash.reader.infrastructure.exception | ||
|
||
open class BusinessException : Exception { | ||
constructor() : super() | ||
constructor(message: String) : super(message) | ||
constructor(message: String, cause: Throwable) : super(message, cause) | ||
constructor(cause: Throwable) : super(cause) | ||
constructor( | ||
message: String, | ||
cause: Throwable, | ||
enableSuppression: Boolean, | ||
writableStackTrace: Boolean, | ||
) : super(message, cause, enableSuppression, writableStackTrace) | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/me/ash/reader/infrastructure/exception/FeverAPIException.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,14 @@ | ||
package me.ash.reader.infrastructure.exception | ||
|
||
class FeverAPIException : BusinessException { | ||
constructor() : super() | ||
constructor(message: String) : super(message) | ||
constructor(message: String, cause: Throwable) : super(message, cause) | ||
constructor(cause: Throwable) : super(cause) | ||
constructor( | ||
message: String, | ||
cause: Throwable, | ||
enableSuppression: Boolean, | ||
writableStackTrace: Boolean, | ||
) : super(message, cause, enableSuppression, writableStackTrace) | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/me/ash/reader/infrastructure/exception/GoogleReaderAPIException.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,14 @@ | ||
package me.ash.reader.infrastructure.exception | ||
|
||
class GoogleReaderAPIException : BusinessException { | ||
constructor() : super() | ||
constructor(message: String) : super(message) | ||
constructor(message: String, cause: Throwable) : super(message, cause) | ||
constructor(cause: Throwable) : super(cause) | ||
constructor( | ||
message: String, | ||
cause: Throwable, | ||
enableSuppression: Boolean, | ||
writableStackTrace: Boolean, | ||
) : super(message, cause, enableSuppression, writableStackTrace) | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/me/ash/reader/infrastructure/exception/RemoteCallException.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,14 @@ | ||
package me.ash.reader.infrastructure.exception | ||
|
||
class RemoteCallException : BusinessException { | ||
constructor() : super() | ||
constructor(message: String) : super(message) | ||
constructor(message: String, cause: Throwable) : super(message, cause) | ||
constructor(cause: Throwable) : super(cause) | ||
constructor( | ||
message: String, | ||
cause: Throwable, | ||
enableSuppression: Boolean, | ||
writableStackTrace: Boolean, | ||
) : super(message, cause, enableSuppression, writableStackTrace) | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/me/ash/reader/infrastructure/exception/RetryException.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,14 @@ | ||
package me.ash.reader.infrastructure.exception | ||
|
||
class RetryException : BusinessException { | ||
constructor() : super() | ||
constructor(message: String) : super(message) | ||
constructor(message: String, cause: Throwable) : super(message, cause) | ||
constructor(cause: Throwable) : super(cause) | ||
constructor( | ||
message: String, | ||
cause: Throwable, | ||
enableSuppression: Boolean, | ||
writableStackTrace: Boolean, | ||
) : super(message, cause, enableSuppression, writableStackTrace) | ||
} |
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