From: Edison Henrique Andreassy Date: Sat, 11 Jul 2020 19:41:52 +0000 (-0300) Subject: Remove catch ThreadAbortException (#39136) X-Git-Tag: submit/tizen/20210909.063632~6769 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f770d5135c7f537c75dd07b64484bd0f8fcbda6;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove catch ThreadAbortException (#39136) --- diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Collection.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Collection.vb index 2d50add..5078a15 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Collection.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Collection.vb @@ -99,8 +99,6 @@ Namespace Microsoft.VisualBasic End If Catch ex As OutOfMemoryException Throw - Catch ex As Threading.ThreadAbortException - Throw Catch ex As StackOverflowException Throw Catch ex As Exception @@ -234,8 +232,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New ArgumentException(SR.Format(SR.Argument_InvalidValue1, NameOf(Index)), NameOf(Index)) End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb index 76e84cba..5054910 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb @@ -1918,8 +1918,6 @@ MisMatch: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As Threading.ThreadAbortException - Throw ex Catch Ex As Exception Return False End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/DoubleType.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/DoubleType.vb index 1f9885a..d7b0809 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/DoubleType.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/DoubleType.vb @@ -177,8 +177,6 @@ ThrowInvalidCast: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Ex As Exception Return False End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb index cb742ee..48ef55b 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb @@ -72,8 +72,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Return "" End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb index ef351da..4e113a3 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb @@ -149,8 +149,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw exInner Catch exInner As OutOfMemoryException Throw exInner - Catch exInner As System.Threading.ThreadAbortException - Throw exInner Catch oTmp = Nothing End Try @@ -421,8 +419,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw exInner Catch exInner As OutOfMemoryException Throw exInner - Catch exInner As System.Threading.ThreadAbortException - Throw exInner Catch exInner As Exception oTmp = Nothing End Try @@ -573,8 +569,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch ex As Exception ' If this assert is triggered due to an AccessViolationException, ' report a bug to the CLR. @@ -820,8 +814,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch ' If this assert is triggered because of an AccessViolation exception, ' report a bug to the CLR. diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb index 47571c8..82a7ca3 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb @@ -1011,8 +1011,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch DecimalResult = -conv.ToDecimal(Nothing) GoTo DecimalExit @@ -1033,8 +1031,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch DoubleResult = -conv.ToDouble(Nothing) GoTo DoubleExit @@ -2094,8 +2090,6 @@ DecimalExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch 'e As OverflowException Return CDec(i1) - CDec(i2) End Try @@ -3285,8 +3279,6 @@ DecimalExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw GetNoValidOperatorException(conv1, conv2) End Try @@ -3303,8 +3295,6 @@ DecimalExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw GetNoValidOperatorException(conv1, conv2) End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/StringType.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/StringType.vb index db96755..aef9196 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/StringType.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/StringType.vb @@ -739,8 +739,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Result = False End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb index 40bc534..60b60d5 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb @@ -79,8 +79,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch s = ResourceMsgDefault End Try @@ -113,8 +111,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch ex As Exception System.Diagnostics.Debug.Fail("Unable to get and format string for ResourceKey: " & ResourceKey) @@ -152,8 +148,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch 'Ignore, should default to 0 values End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb index 12d1604..85d0949 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb @@ -44,8 +44,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch ex As Exception Throw VbMakeException(ex, vbErrors.PathNotFound) End Try @@ -116,8 +114,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch e As Exception End Try End If diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb index c4e3fc3..47a273e 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb @@ -47,8 +47,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch ex As Exception Throw VbMakeException(vbErrors.InternalError) End Try @@ -77,8 +75,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch 'Try Write access m_access = OpenAccess.Write @@ -88,8 +84,6 @@ Namespace Microsoft.VisualBasic.CompilerServices Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch 'If that failed, try read access m_access = OpenAccess.Read diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb index 62c2a08..092909c 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb @@ -519,8 +519,6 @@ RangeCheck: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch 'Throw our own exception below End Try @@ -918,8 +916,6 @@ NextOctCharacter: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(New ArgumentException(SR.Format(SR.Argument_InvalidValueType2, NameOf(Expression), VBFriendlyName(Expression))), vbErrors.OLENoPropOrMethod) End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb index c231eb4..bbaf10c 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb @@ -58,8 +58,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(New InvalidCastException(SR.Format(SR.InvalidCast_FromStringTo, Left(Value, 32), "Date")), vbErrors.IllegalFuncCall) End Try @@ -109,8 +107,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(New InvalidCastException(SR.Format(SR.InvalidCast_FromStringTo, Left(Value, 32), "Date")), vbErrors.IllegalFuncCall) End Try @@ -286,8 +282,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New InvalidCastException(SR.Format(SR.Argument_InvalidDateValue1, "DateValue")) End Try @@ -309,8 +303,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New InvalidCastException(SR.Format(SR.Argument_InvalidDateValue1, "Date1")) End Try @@ -320,8 +312,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New InvalidCastException(SR.Format(SR.Argument_InvalidDateValue1, "Date2")) End Try @@ -341,8 +331,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New InvalidCastException(SR.Format(SR.Argument_InvalidDateValue1, "DateValue")) End Try @@ -416,8 +404,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(New ArgumentException(SR.Format(SR.Argument_InvalidValue1, "Year")), vbErrors.IllegalFuncCall) End Try @@ -428,8 +414,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(New ArgumentException(SR.Format(SR.Argument_InvalidValue1, "Month")), vbErrors.IllegalFuncCall) End Try @@ -440,8 +424,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(New ArgumentException(SR.Format(SR.Argument_InvalidValue1, "Day")), vbErrors.IllegalFuncCall) End Try @@ -569,8 +551,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New ArgumentException(SR.Format(SR.Argument_InvalidValue1, "Weekday")) End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb index bf0cd7e..35ce134 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb @@ -221,8 +221,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch e2 As Exception Throw VbMakeException(e2, vbErrors.PathFileAccess) End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Financial.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Financial.vb index bc10ac9..38e3249 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Financial.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Financial.vb @@ -256,8 +256,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New ArgumentException(SR.Format(SR.Argument_InvalidValue1, "ValueArray")) End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Information.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Information.vb index 20cb00e..ad35199 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Information.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Information.vb @@ -324,8 +324,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Return False End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb index 3f169df..9be740f 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb @@ -395,8 +395,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch ex As Exception 'Consume the exception @@ -531,8 +529,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch e As Exception Throw VbMakeException(vbErrors.CantCreateObject) End Try @@ -548,8 +544,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(vbErrors.CantCreateObject) End Try @@ -564,8 +558,6 @@ Namespace Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw VbMakeException(vbErrors.CantCreateObject) End Try diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb index fefb109..3db1df0 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb @@ -303,8 +303,6 @@ Namespace Global.Microsoft.VisualBasic Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New ArgumentException(SR.Format(SR.Argument_InvalidValueType2, NameOf(Source), "String"), NameOf(Source)) End Try @@ -488,8 +486,6 @@ EmptyMatchString: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New ArgumentException(SR.Format(SR.Argument_InvalidValueType2, "SourceArray", "String")) End Try @@ -973,8 +969,6 @@ RedimAndExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New ArgumentException(SR.Format(SR.Argument_InvalidValue1, "Character")) End Try @@ -1265,8 +1259,6 @@ RedimAndExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch 'Object could not be converted to required type 'so just return the string @@ -2000,8 +1992,6 @@ RedimAndExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch End Try End Function @@ -2026,8 +2016,6 @@ RedimAndExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch Throw New ArgumentException(SR.Format(SR.Argument_LCIDNotSupported1, CStr(LocaleID))) End Try @@ -2155,8 +2143,6 @@ RedimAndExit: Throw ex Catch ex As OutOfMemoryException Throw ex - Catch ex As System.Threading.ThreadAbortException - Throw ex Catch ValidLCID = False End Try