-
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.
Use nested class for Failure.Exeption
- Loading branch information
pmosk
committed
Dec 4, 2023
1 parent
7389583
commit e3b003a
Showing
9 changed files
with
27 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
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 was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/core-taggeds-failure/Failure/Failure.T/T.Exception.From.cs
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/core-taggeds-failure/Failure/Failure.T/T.Exception.To.cs
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,11 @@ | ||
namespace System; | ||
|
||
partial struct Failure<TFailureCode> | ||
{ | ||
public Failure<TFailureCode>.Exception ToException() | ||
=> | ||
new( | ||
failureCode: FailureCode, | ||
message: failureMessage, | ||
innerException: SourceException); | ||
} |
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 @@ | ||
namespace System; | ||
|
||
partial struct Failure<TFailureCode> | ||
{ | ||
public sealed class Exception : System.Exception | ||
{ | ||
public Exception(TFailureCode failureCode, string? message, System.Exception? innerException) | ||
: base(message, innerException) | ||
=> | ||
FailureCode = failureCode; | ||
|
||
public TFailureCode FailureCode { get; } | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
src/core-taggeds-failure/Failure/FailureException/Exception.Failure.As.cs
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/core-taggeds-failure/Failure/FailureException/Exception.Failure.From.cs
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
src/core-taggeds-failure/Failure/FailureException/FailureException.cs
This file was deleted.
Oops, something went wrong.