Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (10)
24throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, Type.GetTypeFromHandle(structureTypeHandle)), nameof(structureTypeHandle));
47throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, Type.GetTypeFromHandle(structureTypeHandle)), nameof(fieldName));
50throw new NotSupportedException(SR.Format(SR.StructMarshalling_MissingInteropData, Type.GetTypeFromHandle(structureTypeHandle)!));
61throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, Type.GetTypeFromHandle(structureTypeHandle)), nameof(structureTypeHandle));
80throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, structureType));
84throw new NotSupportedException(SR.Format(SR.StructMarshalling_MissingInteropData, structureType));
109throw new NotSupportedException(SR.Format(SR.DelegateMarshalling_MissingInteropData, Type.GetTypeFromHandle(delegateTypeHandle)));
118throw new NotSupportedException(SR.Format(SR.DelegateMarshalling_MissingInteropData, Type.GetTypeFromHandle(delegateTypeHandle)));
213throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, Type.GetTypeFromHandle(structTypeHandle)));
226throw new NotSupportedException(SR.Format(SR.StructMarshalling_MissingInteropData, Type.GetTypeFromHandle(structTypeHandle)));
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (6)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) :
134new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, path), path) :
145new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, path), inner) :
150new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, path)) :
155new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) :
167return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (9)
1065throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1090throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1110throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1132throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1153throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1321_ => throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)),
1643throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format));
1659throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1680throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (10)
5309return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument)));
5311return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument)));
5315return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument)));
5317return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument)));
5319return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument));
5321return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument)));
5323return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument)));
5327return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument)));
5329return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument));
5333return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (10)
84throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode));
114throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode));
265throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode));
299throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode));
336throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode));
376throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
615throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
653throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c));
732throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
948throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[^1]) ? 0 : 1)), nameof(ascii));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (12)
59return new IOException(SR.Format(SR.Arg_FileIsDirectory_Name, path));
131throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, sourceFullPath));
140throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, destFullPath));
409throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
421throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath), sourceFullPath);
441throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
445throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, destFullPath));
455throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, sourceFullPath), errorInfo.RawErrno);
457throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath), sourceFullPath);
459throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
565throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath));
709throw new IOException(SR.Format(SR.IO_TooManySymbolicLinkLevels, linkPath));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (7)
164protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetConstructor))); }
167public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetConstructor))); }
170protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetMethod))); }
173public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetMethod))); }
176public override FieldInfo GetField(string name, BindingFlags bindingAttr) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetField))); }
179public override FieldInfo[] GetFields(BindingFlags bindingAttr) { throw new NotSupportedException(SR.Format(SR.NotSupported_TypeBuilderInstantiation_ResolvingMembers, nameof(TypeBuilder.GetField))); }
255public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (15)
222throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r));
318throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
393throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index));
416throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
430throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
436throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
457throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
483throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName));
496throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString));
704throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
711throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
718throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
732throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
744throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
828throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType));
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (9)
83throw new ArgumentException(SR.Format(SR.Argument_TypeContainsReferences, targetType));
143throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other");
163throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer));
309return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key));
620throw new FormatException(SR.Format(SR.Format_BadBoolean, new string(value)));
626throw new ArgumentOutOfRangeException("precision", SR.Format(SR.Argument_PrecisionTooLarge, StandardFormat.MaxPrecision));
697return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_Attribute, attribute));
702return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_CustomAttributeData, customAttributeData));
740return new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));