Diagnostics checkpoint
Challenge on lesson: Checkpoint lesson: diagnose the broken service
CHALLENGE
Difficulty: advanced+25 XP
Implement static string Describe(Exception ex) producing a one-line diagnostic: "<TypeName>: <Message> | caused by: <TypeName>: <Message> | ..." walking the InnerException chain to the root, joined with " | caused by: ". Then implement static (int depth, string rootType) Analyze(Exception ex) returning the inner-exception depth (0 for no inner) and the root exception's type name. The graded skill: never lose the root cause buried in AggregateException/InnerException chains.
Press Submit to check your solution.
Back to lesson: Checkpoint lesson: diagnose the broken service