From a356f0ee261e4940c9b4e0e87a7d6d3100edbaa4 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 10 Dec 2017 20:53:18 +0100 Subject: [PATCH] Do not catch OperationCanceledException: Closes #994 --- ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs b/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs index 6fa44b002..c7dfd5ace 100644 --- a/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs +++ b/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs @@ -789,7 +789,7 @@ namespace ICSharpCode.Decompiler.CSharp RemoveAttribute(entityDecl, new TopLevelTypeName("System.Runtime.CompilerServices", "AsyncStateMachineAttribute")); RemoveAttribute(entityDecl, new TopLevelTypeName("System.Diagnostics", "DebuggerStepThroughAttribute")); } - } catch (Exception innerException) { + } catch (Exception innerException) when (!(innerException is OperationCanceledException)) { throw new DecompilerException(methodDefinition, innerException); } }