64 references to Error
Microsoft.CSharp (64)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (1)
483
throw ErrorHandling.
Error
(ErrorCode.ERR_DynamicBindingComUnsupported);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
1168
throw ErrorHandling.
Error
(ErrorCode.ERR_BadIndexCount, type.GetArrayRank());
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (8)
395
throw ErrorHandling.
Error
(ErrorCode.ERR_ConstOutOfRange, value, dest);
401
throw ErrorHandling.
Error
(ErrorCode.ERR_ValueCantBeNull, dest);
406
throw ErrorHandling.
Error
(canCast(expr.Type, dest, flags) ? ErrorCode.ERR_NoImplicitConvCast : ErrorCode.ERR_NoImplicitConv, new ErrArg(expr.Type, ErrArgFlags.Unique), new ErrArg(dest, ErrArgFlags.Unique));
480
throw ErrorHandling.
Error
(
517
throw ErrorHandling.
Error
(ErrorCode.ERR_ConstOutOfRangeChecked, value, dest);
523
throw ErrorHandling.
Error
(ErrorCode.ERR_ValueCantBeNull, dest);
534
return ErrorHandling.
Error
(ErrorCode.ERR_NoExplicitConv, new ErrArg(expr.Type, ErrArgFlags.Unique), new ErrArg(dest, ErrArgFlags.Unique));
1087
return ErrorHandling.
Error
(ErrorCode.ERR_AmbigUDConv, prguci[iuciBestSrc].Meth, prguci[iuciBestDst].Meth, typeSrc, typeDst);
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (14)
514
throw ErrorHandling.
Error
(ErrorCode.ERR_PropertyLacksGet, pwt);
529
throw ErrorHandling.
Error
(ErrorCode.ERR_BadProtectedAccess, pwt, type, ContextForMemberLookup);
532
throw ErrorHandling.
Error
(ErrorCode.ERR_InaccessibleGetter, pwt);
646
throw ErrorHandling.
Error
(ErrorCode.ERR_AmbigCall, pmethAmbig1.mpwi, pmethAmbig2.mpwi);
823
return ErrorHandling.
Error
(ErrorCode.ERR_BadBinaryOps, strOp, pOperand1.Type, pOperand2.Type);
826
return ErrorHandling.
Error
(ErrorCode.ERR_BadUnaryOp, strOp, pOperand1.Type);
862
throw ErrorHandling.
Error
(ErrorCode.ERR_BadProtectedAccess, pwtSlot, type, ContextForMemberLookup);
864
throw ErrorHandling.
Error
(mwt.Meth().isSetAccessor() ? ErrorCode.ERR_InaccessibleSetter : ErrorCode.ERR_InaccessibleGetter, pwtSlot);
916
throw ErrorHandling.
Error
(ErrorCode.ERR_AssgReadonlyProp, prop.PropWithTypeSlot);
921
throw ErrorHandling.
Error
(
927
throw ErrorHandling.
Error
(GetStandardLvalueError(kind));
988
throw ErrorHandling.
Error
(ErrorCode.ERR_ObjectProhibited, swt);
991
throw ErrorHandling.
Error
(ErrorCode.ERR_ObjectRequired, swt);
1644
throw ErrorHandling.
Error
(ErrorCode.ERR_UnsafeNeeded);
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (16)
337
throw ErrorHandling.
Error
(ErrorCode.ERR_AmbigCall, pAmbig1.mpwi, pAmbig2.mpwi);
341
throw ErrorHandling.
Error
(ErrorCode.ERR_AmbigCall, pAmbig1.mpwi.MethProp(), pAmbig2.mpwi.MethProp());
1099
return ErrorHandling.
Error
(ErrorCode.ERR_DuplicateNamedArgument, _pDuplicateSpecifiedName);
1132
return ErrorHandling.
Error
(ErrorCode.ERR_BadNonTrailingNamedArgument, name);
1145
return ErrorHandling.
Error
(ErrorCode.ERR_BindToBogus, _mpwiBogus);
1178
return ErrorHandling.
Error
(ErrorCode.ERR_CantInferMethTypeArgs, mwtCantInfer);
1184
return ErrorHandling.
Error
(cvar > 0 ? ErrorCode.ERR_BadArity : ErrorCode.ERR_HasNoTypeVars, _mwtBadArity, new ErrArgSymKind(_mwtBadArity.Meth()), _pArguments.carg);
1199
? ErrorHandling.
Error
(
1202
: ErrorHandling.
Error
(ErrorCode.ERR_BadNamedArgument, _pGroup.Name, _pInvalidSpecifiedName);
1207
return ErrorHandling.
Error
(ErrorCode.ERR_NamedArgumentUsedInPositional, _pNameUsedInPositionalArgument);
1214
return ErrorHandling.
Error
(ErrorCode.ERR_BindToBogus, nameErr);
1220
return ErrorHandling.
Error
(ErrorCode.ERR_BadDelArgCount, nameErr, _pArguments.carg);
1226
return ErrorHandling.
Error
(ErrorCode.ERR_BadCtorArgCount, _pGroup.ParentType, _pArguments.carg);
1229
return ErrorHandling.
Error
(ErrorCode.ERR_BadArgCount, nameErr, _pArguments.carg);
1237
return ErrorHandling.
Error
(ErrorCode.ERR_BadDelArgTypes, _results.BestResult.GetType());
1240
return ErrorHandling.
Error
(ErrorCode.ERR_BadArgTypes, _results.BestResult);
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (12)
478
? ErrorHandling.
Error
(
481
: ErrorHandling.
Error
(
606
return ErrorHandling.
Error
(ErrorCode.ERR_AmbigMember, _swtFirst, _swtAmbig);
612
? ErrorHandling.
Error
(ErrorCode.ERR_CantCallSpecialMethod, _swtInaccess)
620
? ErrorHandling.
Error
(ErrorCode.ERR_BadCtorArgCount, ((AggregateType)_typeSrc).OwningAggregate, _arity)
621
: ErrorHandling.
Error
(ErrorCode.ERR_NoConstructors, ((AggregateType)_typeSrc).OwningAggregate);
626
return ErrorHandling.
Error
(ErrorCode.ERR_NoSuchMember, _typeSrc, _name);
631
return ErrorHandling.
Error
(ErrorCode.ERR_BadIndexLHS, _typeSrc);
636
return ErrorHandling.
Error
((_flags & MemLookFlags.MustBeInvocable) != 0 ? ErrorCode.ERR_NonInvocableMemberCalled : ErrorCode.ERR_CantCallSpecialMethod, _swtBad);
651
return ErrorHandling.
Error
(cvar > 0 ? ErrorCode.ERR_BadArity : ErrorCode.ERR_HasNoTypeVars, _swtBadArity, new ErrArgSymKind(_swtBadArity.Sym), cvar);
654
return ErrorHandling.
Error
(ErrorCode.ERR_TypeArgsNotAllowed, _swtBadArity, new ErrArgSymKind(_swtBadArity.Sym));
657
return ErrorHandling.
Error
(ErrorCode.ERR_NoSuchMember, _typeSrc, _name);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (5)
2381
? ErrorHandling.
Error
(ErrorCode.ERR_AmbigBinaryOps, strOp, op1.Type, op2.Type)
2382
: ErrorHandling.
Error
(ErrorCode.ERR_AmbigUnaryOp, strOp, op1.Type);
2400
throw ErrorHandling.
Error
(ErrorCode.ERR_BadBoolOp, pCall.MethWithInst);
2419
throw ErrorHandling.
Error
(ErrorCode.ERR_MustHaveOpTF, typeRet);
2628
throw ErrorHandling.
Error
(ErrorCode.ERR_AmbigCall, pmethAmbig1.mpwi, pmethAmbig2.mpwi);
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (3)
29
throw ErrorHandling.
Error
(ErrorCode.ERR_ConvertToStaticClass, type);
266
? ErrorHandling.
Error
(ErrorCode.ERR_BadProtectedAccess, swtBad, typeQual, symWhere)
267
: ErrorHandling.
Error
(ErrorCode.ERR_BadAccess, swtBad);
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (4)
177
throw ErrorHandling.
Error
(ErrorCode.ERR_RefConstraintNotSatisfied, symErr, new ErrArgNoRef(var), arg);
200
throw ErrorHandling.
Error
(ErrorCode.ERR_ValConstraintNotSatisfied, symErr, new ErrArgNoRef(var), arg);
268
throw ErrorHandling.
Error
(error, new ErrArg(symErr), new ErrArg(typeBnd, ErrArgFlags.Unique), var, new ErrArg(arg, ErrArgFlags.Unique));
299
throw ErrorHandling.
Error
(ErrorCode.ERR_NewConstraintNotSatisfied, symErr, new ErrArgNoRef(var), arg);