提交 7b8c721e 编写于 作者: G Gen Lu

Replace exception-throwing with return value `Invalid` when unexpected value...

Replace exception-throwing with return value `Invalid` when unexpected value is encountered inIOperation APIs
上级 6eb18818
......@@ -1123,7 +1123,7 @@ protected override OperationKind ExpressionKind
return OperationKind.BinaryOperatorExpression;
default:
throw ExceptionUtilities.UnexpectedValue(this.OperatorKind & BinaryOperatorKind.OpMask);
return OperationKind.InvalidExpression;
}
}
}
......
......@@ -774,7 +774,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Case BinaryOperatorKind.GreaterThan
Return BinaryOperationKind.OperatorMethodGreaterThan
Case Else
Throw ExceptionUtilities.UnexpectedValue(OperatorKind And BinaryOperatorKind.OpMask)
Return BinaryOperationKind.Invalid
End Select
End Get
End Property
......@@ -808,7 +808,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return OperationKind.BinaryOperatorExpression
End Select
Throw ExceptionUtilities.UnexpectedValue(Me.OperatorKind And BinaryOperatorKind.OpMask)
Return OperationKind.InvalidExpression
End Function
Public Overrides Sub Accept(visitor As OperationVisitor)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册