From db88dbe6d0886cafab9dca25e11b02636f3596df Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:58:08 +0100 Subject: [PATCH] Avoid wrapping cancellation exception (#26) --- src/Speckle.Core/Serialisation/BaseObjectSerializerV2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Speckle.Core/Serialisation/BaseObjectSerializerV2.cs b/src/Speckle.Core/Serialisation/BaseObjectSerializerV2.cs index 6ae25821..fb4efe46 100644 --- a/src/Speckle.Core/Serialisation/BaseObjectSerializerV2.cs +++ b/src/Speckle.Core/Serialisation/BaseObjectSerializerV2.cs @@ -96,7 +96,7 @@ public class BaseObjectSerializerV2 } converted = x; } - catch (Exception ex) when (!ex.IsFatal()) + catch (Exception ex) when (!ex.IsFatal() && ex is not OperationCanceledException) { throw new SpeckleSerializeException($"Failed to extract (pre-serialize) properties from the {baseObj}", ex); }