Skip to content

Translate HRESULT error codes from the DiagnosticClient into human-readable exceptions #2784

@kelltrick

Description

@kelltrick

We should translate the HRESULT exception codes we receive from DiagnosticClient into meaningful human-readable descriptions of the codes.

Background and Motivation

When we get an error from the DiagnosticClient it will look something like this:

=> TargetProcessId:11588 TargetRuntimeInstanceCookie:8fc502a39434444ab2c67aaed1b27a5b CollectionRuleName:LoadAllocationProfiler => CollectionRuleTriggerType:Startup => CollectionRuleActionType:LoadProfiler CollectionRuleActionIndex:0
      Collection rule 'LoadAllocationProfiler' action 'LoadProfiler' failed.
      Microsoft.Diagnostics.Tools.Monitor.CollectionRules.Exceptions.CollectionRuleActionException: SetStartupProfilerAsync failed - HRESULT: 0x8013135B

Proposed Feature

We should translate the code 0x8013135B into it's description "Not Yet Available". Full list of codes here: dotnet/runtime:/src/native/eventpipe/ds-types.h: line 127

The example above would look something like this:

=> TargetProcessId:11588 TargetRuntimeInstanceCookie:8fc502a39434444ab2c67aaed1b27a5b CollectionRuleName:LoadAllocationProfiler => CollectionRuleTriggerType:Startup => CollectionRuleActionType:LoadProfiler CollectionRuleActionIndex:0
      Collection rule 'LoadAllocationProfiler' action 'LoadProfiler' failed.
      Microsoft.Diagnostics.Tools.Monitor.CollectionRules.Exceptions.CollectionRuleActionException: SetStartupProfilerAsync failed - IPC Command Not Yet Available (HRESULT: 0x8013135B)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions