diff --git a/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializationManager.cs b/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializationManager.cs index 00a6700..083dedd 100644 --- a/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializationManager.cs +++ b/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializationManager.cs @@ -196,6 +196,8 @@ public virtual Type GetType(XmlQualifiedName xmlQualifiedName) } catch (Exception ex) when (!ExceptionUtility.IsCriticalException(ex)) { + // Intentionally ignore non-critical exceptions when resolving the type. + // Fallback logic below will handle the case where resolvedType remains null. } if (resolvedType == null) @@ -244,6 +246,8 @@ public virtual Type GetType(string typeName) } catch (Exception ex) when (!ExceptionUtility.IsCriticalException(ex)) { + // Intentionally ignore non-critical exceptions when resolving the type. + // Fallback logic below will handle the case where type remains null. } } @@ -273,6 +277,8 @@ public virtual Type GetType(string typeName) } catch (Exception ex) when (!ExceptionUtility.IsCriticalException(ex)) { + // Intentionally ignore non-critical exceptions when the assembly cannot be loaded. + // Fallback logic below will handle the case where assembly is null. } } diff --git a/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializer.cs b/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializer.cs index 149f212..4b780b9 100644 --- a/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializer.cs +++ b/LogicBuilder.Workflow.ComponentModel.Serialization/ComponentModel/Serialization/WorkflowMarkupSerializer.cs @@ -1394,9 +1394,9 @@ private void DeserializeCompoundProperty(WorkflowMarkupSerializationManager seri { property.SetValue(obj, propValue, null); } - catch + catch (Exception ex) when (!ExceptionUtility.IsCriticalException(ex)) { - serializationManager.ReportError(new WorkflowMarkupSerializationException(SR.GetString(SR.Error_SerializerComplexPropertySetFailed, [propertyName, propertyName, obj.GetType().Name]))); + serializationManager.ReportError(new WorkflowMarkupSerializationException(SR.GetString(SR.Error_SerializerComplexPropertySetFailed, [propertyName, propertyName, obj.GetType().Name]), ex)); } } }