ElseIf Err.Number <> 0 Then Dim ex As Exception = Err.GetException() On Error GoTo 0 Throw New InvalidOperationException("想定外のエラーです。", ex) End If
ElseIf Err.Number <> 0 Then Dim ex As Exception = Err.GetException() On Error GoTo 0 Throw ex End If