From dfaab1b3f1f56f76c48b5b04b0ffe53c441e9a7c Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Thu, 20 Jun 2024 22:00:28 +0800 Subject: [PATCH] refine the error message --- src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs b/src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs index f5df88ab204..db721352fd4 100644 --- a/src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs +++ b/src/AutoRest.CSharp/Common/Generation/Types/TypeFactory.cs @@ -89,7 +89,7 @@ public TypeFactory(OutputLibrary library, Type unknownType) }, InputDateTimeType dateTimeType => new CSharpType(typeof(DateTimeOffset), inputType.IsNullable), InputDurationType durationType => new CSharpType(typeof(TimeSpan), inputType.IsNullable), - _ => throw new Exception("Unknown type") + _ => throw new InvalidOperationException($"Unknown type: {inputType}") }; ///