Remove catch ThreadAbortException (#39136)
authorEdison Henrique Andreassy <ehasis@hotmail.com>
Sat, 11 Jul 2020 19:41:52 +0000 (16:41 -0300)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2020 19:41:52 +0000 (15:41 -0400)
17 files changed:
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Collection.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Conversions.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/DoubleType.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/LateBinding.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/StringType.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Financial.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Information.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb
src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb

index 2d50add..5078a15 100644 (file)
@@ -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
index 76e84cb..5054910 100644 (file)
@@ -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
index 1f9885a..d7b0809 100644 (file)
@@ -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
index cb742ee..48ef55b 100644 (file)
@@ -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
index ef351da..4e113a3 100644 (file)
@@ -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.
index 47571c8..82a7ca3 100644 (file)
@@ -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
index db96755..aef9196 100644 (file)
@@ -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
index 40bc534..60b60d5 100644 (file)
@@ -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
index 12d1604..85d0949 100644 (file)
@@ -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
index c4e3fc3..47a273e 100644 (file)
@@ -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
index 62c2a08..092909c 100644 (file)
@@ -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
index c231eb4..bbaf10c 100644 (file)
@@ -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
index bf0cd7e..35ce134 100644 (file)
@@ -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
index bc10ac9..38e3249 100644 (file)
@@ -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
index 20cb00e..ad35199 100644 (file)
@@ -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
index 3f169df..9be740f 100644 (file)
@@ -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
index fefb109..3db1df0 100644 (file)
@@ -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