src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (6)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) :
133new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, path)) :
141new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, path), inner) :
146new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, path)) :
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) :
163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno);
src\libraries\Common\src\System\IO\Win32Marshal.cs (7)
35string.IsNullOrEmpty(path) ? SR.IO_FileNotFound : SR.Format(SR.IO_FileNotFound_FileName, path), path);
38string.IsNullOrEmpty(path) ? SR.IO_PathNotFound_NoPathName : SR.Format(SR.IO_PathNotFound_Path, path));
41string.IsNullOrEmpty(path) ? SR.UnauthorizedAccess_IODenied_NoPathName : SR.Format(SR.UnauthorizedAccess_IODenied_Path, path));
45return new IOException(SR.Format(SR.IO_AlreadyExists_Name, path), MakeHRFromErrorCode(errorCode));
48string.IsNullOrEmpty(path) ? SR.IO_PathTooLong : SR.Format(SR.IO_PathTooLong_Path, path));
51string.IsNullOrEmpty(path) ? SR.IO_SharingViolation_NoFileName : SR.Format(SR.IO_SharingViolation_File, path),
56return new IOException(SR.Format(SR.IO_FileExists_Name, path), MakeHRFromErrorCode(errorCode));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (9)
1071throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1096throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1116throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1138throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1159throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1327_ => throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)),
1649throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format));
1665throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1686throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (10)
5204return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument)));
5206return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument)));
5210return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument)));
5212return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument)));
5214return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument));
5216return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument)));
5218return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument)));
5222return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument)));
5224return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument));
5228return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument)));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (5)
38throw new ArgumentException(SR.Format(SR.Argument_InvalidCultureName, name), nameof(name));
43throw new ArgumentException(SR.Format(SR.Argument_InvalidNeutralRegionName, name), nameof(name));
60throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
66throw new ArgumentException(SR.Format(SR.Argument_CustomCultureCannotBePassedByNumber, culture), nameof(culture));
75throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
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));
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));
459throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
565throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath));
704throw new IOException(SR.Format(SR.IO_TooManySymbolicLinkLevels, linkPath));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (15)
226throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r));
322throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
397throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index));
420throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
434throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
440throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
461throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
487throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName));
500throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString));
708throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
715throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
722throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
736throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
748throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
832throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (9)
83throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType));
137throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other");
157throw 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\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));