Skip to content

Commit 94a45c2

Browse files
committed
Print individual stack traces in error schema message during schema building.
1 parent 909a417 commit 94a45c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/HotChocolate/Core/src/Types/SchemaException.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ private static string CreateErrorMessage(IReadOnlyList<ISchemaError> errors)
4646
message.Append($" ({error.TypeSystemObject.GetType().GetTypeName()})");
4747
}
4848

49+
if (error.Exception is not null)
50+
{
51+
message.AppendLine();
52+
message.AppendLine();
53+
message.Append(error.Exception.StackTrace);
54+
message.AppendLine();
55+
}
56+
4957
message.AppendLine();
5058
}
5159

0 commit comments

Comments
 (0)