Skip to content

Commit

Permalink
Small cleanup around exceptions (#1721)
Browse files Browse the repository at this point in the history
  • Loading branch information
sungam3r authored Mar 1, 2023
1 parent 8ec597b commit 35225ad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<Import Project="build/versions.props" />

<PropertyGroup Label="Package information">
<PropertyGroup>
<PackageId>AspNetCore.$(MSBuildProjectName)</PackageId>
<PackageIcon>icon.png</PackageIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
2 changes: 1 addition & 1 deletion src/HealthChecks.Kubernetes/KubernetesHealthCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context
}
catch (Exception ex)
{
return new HealthCheckResult(context.Registration.FailureStatus, ex.Message);
return new HealthCheckResult(context.Registration.FailureStatus, ex.Message, ex);
}
}
}
2 changes: 1 addition & 1 deletion src/HealthChecks.System/ProcessHealthCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, Canc
return Task.FromResult(new HealthCheckResult(HealthStatus.Unhealthy, exception: ex));
}

return Task.FromResult(new HealthCheckResult(context.Registration.FailureStatus, exception: null));
return Task.FromResult(new HealthCheckResult(context.Registration.FailureStatus));
}
}
2 changes: 1 addition & 1 deletion src/HealthChecks.System/WindowsServiceHealthCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, Canc
return Task.FromResult(new HealthCheckResult(context.Registration.FailureStatus, exception: ex));
}

return Task.FromResult(new HealthCheckResult(context.Registration.FailureStatus, exception: null));
return Task.FromResult(new HealthCheckResult(context.Registration.FailureStatus));
}

private ServiceController GetServiceController() =>
Expand Down

0 comments on commit 35225ad

Please sign in to comment.