-
Notifications
You must be signed in to change notification settings - Fork 53
Include Exception Properties at FailureDetails #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
c8ff67f
3d4e485
8636a3d
c4321e4
e3a7f8a
e98024b
121a605
c34de93
c084057
d5f45fe
15c8393
221bc3d
e155c7e
edb5504
15c86e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,8 @@ namespace Microsoft.DurableTask; | |
| /// <param name="ErrorMessage">A summary description of the failure.</param> | ||
| /// <param name="StackTrace">The stack trace of the failure.</param> | ||
| /// <param name="InnerFailure">The inner cause of the task failure.</param> | ||
| public record TaskFailureDetails(string ErrorType, string ErrorMessage, string? StackTrace, TaskFailureDetails? InnerFailure) | ||
| /// <param name="Properties">Additional properties associated with the exception.</param> | ||
| public record TaskFailureDetails(string ErrorType, string ErrorMessage, string? StackTrace, TaskFailureDetails? InnerFailure, IDictionary<string, object>? Properties) | ||
| { | ||
| Type? loadedExceptionType; | ||
|
|
||
|
|
@@ -123,7 +124,8 @@ internal CoreFailureDetails ToCoreFailureDetails() | |
| this.ErrorMessage, | ||
| this.StackTrace, | ||
| this.InnerFailure?.ToCoreFailureDetails(), | ||
| isNonRetriable: false); | ||
| isNonRetriable: false, | ||
| this.Properties); | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
@@ -143,7 +145,8 @@ internal CoreFailureDetails ToCoreFailureDetails() | |
| coreFailureDetails.ErrorType, | ||
| coreFailureDetails.ErrorMessage, | ||
| coreFailureDetails.StackTrace, | ||
| FromCoreFailureDetails(coreFailureDetails.InnerFailure)); | ||
| FromCoreFailureDetails(coreFailureDetails.InnerFailure), | ||
| coreFailureDetails.Properties); | ||
| } | ||
|
|
||
| [return: NotNullIfNotNull(nameof(exception))] | ||
|
|
@@ -160,14 +163,16 @@ internal CoreFailureDetails ToCoreFailureDetails() | |
| coreEx.FailureDetails?.ErrorType ?? "(unknown)", | ||
| coreEx.FailureDetails?.ErrorMessage ?? "(unknown)", | ||
| coreEx.FailureDetails?.StackTrace, | ||
| FromCoreFailureDetailsRecursive(coreEx.FailureDetails?.InnerFailure) ?? FromExceptionRecursive(coreEx.InnerException)); | ||
| FromCoreFailureDetailsRecursive(coreEx.FailureDetails?.InnerFailure) ?? FromExceptionRecursive(coreEx.InnerException), | ||
| coreEx.FailureDetails?.Properties ?? null); | ||
| } | ||
|
|
||
| return new TaskFailureDetails( | ||
| exception.GetType().ToString(), | ||
| exception.Message, | ||
| exception.StackTrace, | ||
| FromExceptionRecursive(exception.InnerException)); | ||
| FromExceptionRecursive(exception.InnerException), | ||
| null);// might need to udpate this later | ||
|
||
| } | ||
|
|
||
| static TaskFailureDetails? FromCoreFailureDetailsRecursive(CoreFailureDetails? coreFailureDetails) | ||
|
|
@@ -181,6 +186,7 @@ internal CoreFailureDetails ToCoreFailureDetails() | |
| coreFailureDetails.ErrorType, | ||
| coreFailureDetails.ErrorMessage, | ||
| coreFailureDetails.StackTrace, | ||
| FromCoreFailureDetailsRecursive(coreFailureDetails.InnerFailure)); | ||
| FromCoreFailureDetailsRecursive(coreFailureDetails.InnerFailure), | ||
| coreFailureDetails.Properties); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.