Skip to content

Commit

Permalink
Remove catch ThreadAbortException (#39136)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehasis committed Jul 11, 2020
1 parent 5ea1b90 commit 0f770d5
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 0f770d5

Please sign in to comment.