This repository has been archived by the owner on Jan 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
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 #38 from vjames19/master
ExceptionResult is now Typed and withCause and withMessage are now fluent
- Loading branch information
Showing
4 changed files
with
89 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package org.amshove.kluent | ||
|
||
class ExceptionResult(val exception: Exception) { | ||
class ExceptionResult<out T : Exception>(val exception: T) { | ||
val exceptionMessage = exception.message ?: "" | ||
val exceptionCause = exception.cause | ||
} | ||
|
||
class NotThrowExceptionResult(val exception: Exception) { | ||
val exceptionMessage = exception.message ?: "" | ||
val exceptionCause = exception.cause | ||
} | ||
} |
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