138 references to ErrorCode
Microsoft.CSharp (138)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (1)
481
throw ErrorHandling.Error(
ErrorCode
.ERR_DynamicBindingComUnsupported);
Microsoft\CSharp\RuntimeBinder\Errors\ErrorFacts.cs (61)
11
public static string GetMessage(
ErrorCode
code)
16
case
ErrorCode
.ERR_BadBinaryOps:
19
case
ErrorCode
.ERR_BadIndexLHS:
22
case
ErrorCode
.ERR_BadIndexCount:
25
case
ErrorCode
.ERR_BadUnaryOp:
28
case
ErrorCode
.ERR_NoImplicitConv:
31
case
ErrorCode
.ERR_NoExplicitConv:
34
case
ErrorCode
.ERR_ConstOutOfRange:
37
case
ErrorCode
.ERR_AmbigBinaryOps:
40
case
ErrorCode
.ERR_AmbigUnaryOp:
43
case
ErrorCode
.ERR_ValueCantBeNull:
46
case
ErrorCode
.ERR_NoSuchMember:
49
case
ErrorCode
.ERR_ObjectRequired:
52
case
ErrorCode
.ERR_AmbigCall:
55
case
ErrorCode
.ERR_BadAccess:
58
case
ErrorCode
.ERR_AssgLvalueExpected:
61
case
ErrorCode
.ERR_NoConstructors:
64
case
ErrorCode
.ERR_PropertyLacksGet:
67
case
ErrorCode
.ERR_ObjectProhibited:
70
case
ErrorCode
.ERR_AssgReadonly:
73
case
ErrorCode
.ERR_AssgReadonlyStatic:
76
case
ErrorCode
.ERR_AssgReadonlyProp:
79
case
ErrorCode
.ERR_UnsafeNeeded:
82
case
ErrorCode
.ERR_BadBoolOp:
85
case
ErrorCode
.ERR_MustHaveOpTF:
88
case
ErrorCode
.ERR_ConstOutOfRangeChecked:
91
case
ErrorCode
.ERR_AmbigMember:
94
case
ErrorCode
.ERR_NoImplicitConvCast:
97
case
ErrorCode
.ERR_InaccessibleGetter:
100
case
ErrorCode
.ERR_InaccessibleSetter:
103
case
ErrorCode
.ERR_BadArity:
106
case
ErrorCode
.ERR_TypeArgsNotAllowed:
109
case
ErrorCode
.ERR_HasNoTypeVars:
112
case
ErrorCode
.ERR_NewConstraintNotSatisfied:
115
case
ErrorCode
.ERR_GenericConstraintNotSatisfiedRefType:
118
case
ErrorCode
.ERR_GenericConstraintNotSatisfiedNullableEnum:
121
case
ErrorCode
.ERR_GenericConstraintNotSatisfiedNullableInterface:
124
case
ErrorCode
.ERR_GenericConstraintNotSatisfiedValType:
127
case
ErrorCode
.ERR_CantInferMethTypeArgs:
130
case
ErrorCode
.ERR_RefConstraintNotSatisfied:
133
case
ErrorCode
.ERR_ValConstraintNotSatisfied:
136
case
ErrorCode
.ERR_AmbigUDConv:
139
case
ErrorCode
.ERR_BindToBogus:
142
case
ErrorCode
.ERR_CantCallSpecialMethod:
145
case
ErrorCode
.ERR_ConvertToStaticClass:
148
case
ErrorCode
.ERR_IncrementLvalueExpected:
151
case
ErrorCode
.ERR_BadArgCount:
154
case
ErrorCode
.ERR_BadArgTypes:
157
case
ErrorCode
.ERR_BadProtectedAccess:
160
case
ErrorCode
.ERR_BindToBogusProp2:
163
case
ErrorCode
.ERR_BindToBogusProp1:
166
case
ErrorCode
.ERR_BadDelArgCount:
169
case
ErrorCode
.ERR_BadDelArgTypes:
172
case
ErrorCode
.ERR_BadCtorArgCount:
175
case
ErrorCode
.ERR_NonInvocableMemberCalled:
178
case
ErrorCode
.ERR_BadNamedArgument:
181
case
ErrorCode
.ERR_BadNamedArgumentForDelegateInvoke:
184
case
ErrorCode
.ERR_DuplicateNamedArgument:
187
case
ErrorCode
.ERR_NamedArgumentUsedInPositional:
190
case
ErrorCode
.ERR_BadNonTrailingNamedArgument:
193
case
ErrorCode
.ERR_DynamicBindingComUnsupported:
Microsoft\CSharp\RuntimeBinder\Errors\ErrorHandling.cs (1)
13
public static RuntimeBinderException Error(
ErrorCode
id, params ErrArg[] args)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
1142
throw ErrorHandling.Error(
ErrorCode
.ERR_BadIndexCount, type.GetArrayRank());
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (9)
385
throw ErrorHandling.Error(
ErrorCode
.ERR_ConstOutOfRange, value, dest);
391
throw ErrorHandling.Error(
ErrorCode
.ERR_ValueCantBeNull, dest);
396
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));
466
ErrorCode
.ERR_ConstOutOfRange,
502
throw ErrorHandling.Error(
ErrorCode
.ERR_ConstOutOfRangeChecked, value, dest);
508
throw ErrorHandling.Error(
ErrorCode
.ERR_ValueCantBeNull, dest);
518
return ErrorHandling.Error(
ErrorCode
.ERR_NoExplicitConv, new ErrArg(expr.Type, ErrArgFlags.Unique), new ErrArg(dest, ErrArgFlags.Unique));
1059
return ErrorHandling.Error(
ErrorCode
.ERR_AmbigUDConv, prguci[iuciBestSrc].Meth, prguci[iuciBestDst].Meth, typeSrc, typeDst);
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (18)
503
throw ErrorHandling.Error(
ErrorCode
.ERR_PropertyLacksGet, pwt);
518
throw ErrorHandling.Error(
ErrorCode
.ERR_BadProtectedAccess, pwt, type, ContextForMemberLookup);
521
throw ErrorHandling.Error(
ErrorCode
.ERR_InaccessibleGetter, pwt);
634
throw ErrorHandling.Error(
ErrorCode
.ERR_AmbigCall, pmethAmbig1.mpwi, pmethAmbig2.mpwi);
806
return ErrorHandling.Error(
ErrorCode
.ERR_BadBinaryOps, strOp, pOperand1.Type, pOperand2.Type);
809
return ErrorHandling.Error(
ErrorCode
.ERR_BadUnaryOp, strOp, pOperand1.Type);
812
private static
ErrorCode
GetStandardLvalueError(CheckLvalueKind kind)
816
?
ErrorCode
.ERR_IncrementLvalueExpected
817
:
ErrorCode
.ERR_AssgLvalueExpected;
843
throw ErrorHandling.Error(
ErrorCode
.ERR_BadProtectedAccess, pwtSlot, type, ContextForMemberLookup);
845
throw ErrorHandling.Error(mwt.Meth().isSetAccessor() ?
ErrorCode
.ERR_InaccessibleSetter :
ErrorCode
.ERR_InaccessibleGetter, pwtSlot);
896
throw ErrorHandling.Error(
ErrorCode
.ERR_AssgReadonlyProp, prop.PropWithTypeSlot);
903
?
ErrorCode
.ERR_AssgReadonlyStatic
904
:
ErrorCode
.ERR_AssgReadonly);
965
throw ErrorHandling.Error(
ErrorCode
.ERR_ObjectProhibited, swt);
968
throw ErrorHandling.Error(
ErrorCode
.ERR_ObjectRequired, swt);
1615
throw ErrorHandling.Error(
ErrorCode
.ERR_UnsafeNeeded);
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (17)
336
throw ErrorHandling.Error(
ErrorCode
.ERR_AmbigCall, pAmbig1.mpwi, pAmbig2.mpwi);
340
throw ErrorHandling.Error(
ErrorCode
.ERR_AmbigCall, pAmbig1.mpwi.MethProp(), pAmbig2.mpwi.MethProp());
1098
return ErrorHandling.Error(
ErrorCode
.ERR_DuplicateNamedArgument, _pDuplicateSpecifiedName);
1131
return ErrorHandling.Error(
ErrorCode
.ERR_BadNonTrailingNamedArgument, name);
1144
return ErrorHandling.Error(
ErrorCode
.ERR_BindToBogus, _mpwiBogus);
1177
return ErrorHandling.Error(
ErrorCode
.ERR_CantInferMethTypeArgs, mwtCantInfer);
1183
return ErrorHandling.Error(cvar > 0 ?
ErrorCode
.ERR_BadArity :
ErrorCode
.ERR_HasNoTypeVars, _mwtBadArity, new ErrArgSymKind(_mwtBadArity.Meth()), _pArguments.carg);
1199
ErrorCode
.ERR_BadNamedArgumentForDelegateInvoke, agg.OwningAggregate.name,
1201
: ErrorHandling.Error(
ErrorCode
.ERR_BadNamedArgument, _pGroup.Name, _pInvalidSpecifiedName);
1206
return ErrorHandling.Error(
ErrorCode
.ERR_NamedArgumentUsedInPositional, _pNameUsedInPositionalArgument);
1213
return ErrorHandling.Error(
ErrorCode
.ERR_BindToBogus, nameErr);
1219
return ErrorHandling.Error(
ErrorCode
.ERR_BadDelArgCount, nameErr, _pArguments.carg);
1225
return ErrorHandling.Error(
ErrorCode
.ERR_BadCtorArgCount, _pGroup.ParentType, _pArguments.carg);
1228
return ErrorHandling.Error(
ErrorCode
.ERR_BadArgCount, nameErr, _pArguments.carg);
1236
return ErrorHandling.Error(
ErrorCode
.ERR_BadDelArgTypes, _results.BestResult.GetType());
1239
return ErrorHandling.Error(
ErrorCode
.ERR_BadArgTypes, _results.BestResult);
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (14)
478
ErrorCode
.ERR_BindToBogusProp1, swt.Sym.name, new SymWithType(meth1 ?? meth2, swt.GetType()),
481
ErrorCode
.ERR_BindToBogusProp2, swt.Sym.name, new SymWithType(meth1, swt.GetType()),
605
return ErrorHandling.Error(
ErrorCode
.ERR_AmbigMember, _swtFirst, _swtAmbig);
611
? ErrorHandling.Error(
ErrorCode
.ERR_CantCallSpecialMethod, _swtInaccess)
619
? ErrorHandling.Error(
ErrorCode
.ERR_BadCtorArgCount, ((AggregateType)_typeSrc).OwningAggregate, _arity)
620
: ErrorHandling.Error(
ErrorCode
.ERR_NoConstructors, ((AggregateType)_typeSrc).OwningAggregate);
625
return ErrorHandling.Error(
ErrorCode
.ERR_NoSuchMember, _typeSrc, _name);
630
return ErrorHandling.Error(
ErrorCode
.ERR_BadIndexLHS, _typeSrc);
635
return ErrorHandling.Error((_flags & MemLookFlags.MustBeInvocable) != 0 ?
ErrorCode
.ERR_NonInvocableMemberCalled :
ErrorCode
.ERR_CantCallSpecialMethod, _swtBad);
650
return ErrorHandling.Error(cvar > 0 ?
ErrorCode
.ERR_BadArity :
ErrorCode
.ERR_HasNoTypeVars, _swtBadArity, new ErrArgSymKind(_swtBadArity.Sym), cvar);
653
return ErrorHandling.Error(
ErrorCode
.ERR_TypeArgsNotAllowed, _swtBadArity, new ErrArgSymKind(_swtBadArity.Sym));
656
return ErrorHandling.Error(
ErrorCode
.ERR_NoSuchMember, _typeSrc, _name);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (5)
2325
? ErrorHandling.Error(
ErrorCode
.ERR_AmbigBinaryOps, strOp, op1.Type, op2.Type)
2326
: ErrorHandling.Error(
ErrorCode
.ERR_AmbigUnaryOp, strOp, op1.Type);
2343
throw ErrorHandling.Error(
ErrorCode
.ERR_BadBoolOp, pCall.MethWithInst);
2362
throw ErrorHandling.Error(
ErrorCode
.ERR_MustHaveOpTF, typeRet);
2565
throw ErrorHandling.Error(
ErrorCode
.ERR_AmbigCall, pmethAmbig1.mpwi, pmethAmbig2.mpwi);
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (3)
28
throw ErrorHandling.Error(
ErrorCode
.ERR_ConvertToStaticClass, type);
261
? ErrorHandling.Error(
ErrorCode
.ERR_BadProtectedAccess, swtBad, typeQual, symWhere)
262
: ErrorHandling.Error(
ErrorCode
.ERR_BadAccess, swtBad);
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (8)
173
throw ErrorHandling.Error(
ErrorCode
.ERR_RefConstraintNotSatisfied, symErr, new ErrArgNoRef(var), arg);
196
throw ErrorHandling.Error(
ErrorCode
.ERR_ValConstraintNotSatisfied, symErr, new ErrArgNoRef(var), arg);
226
ErrorCode
error;
231
error =
ErrorCode
.ERR_GenericConstraintNotSatisfiedRefType;
245
error =
ErrorCode
.ERR_GenericConstraintNotSatisfiedNullableEnum;
254
error =
ErrorCode
.ERR_GenericConstraintNotSatisfiedNullableInterface;
261
error =
ErrorCode
.ERR_GenericConstraintNotSatisfiedValType;
295
throw ErrorHandling.Error(
ErrorCode
.ERR_NewConstraintNotSatisfied, symErr, new ErrArgNoRef(var), arg);