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)
1060throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1085throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1105throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1127throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1148throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1353throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format));
1677throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format));
1693throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1714throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (10)
5185return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument)));
5187return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument)));
5191return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument)));
5193return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument)));
5195return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument));
5197return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument)));
5199return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument)));
5203return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument)));
5205return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument));
5209return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument)));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (8)
83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode));
204throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode));
232throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode));
272throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
511throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
538throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c));
587throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
804throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[output.Length - 1]) ? 0 : 1)), nameof(ascii));
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));
133throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, sourceFullPath));
142throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, destFullPath));
411throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
423throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
443throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
447throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, destFullPath));
457throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, sourceFullPath), errorInfo.RawErrno);
459throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
461throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
567throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath));
706throw new IOException(SR.Format(SR.IO_TooManySymbolicLinkLevels, linkPath));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (15)
228throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r));
324throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
399throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index));
422throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
436throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
442throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
463throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
489throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName));
502throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString));
710throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
717throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
724throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
738throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
750throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
834throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (9)
89throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType));
143throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other");
163throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer));
315return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key));
626throw new FormatException(SR.Format(SR.Format_BadBoolean, new string(value)));
632throw new ArgumentOutOfRangeException("precision", SR.Format(SR.Argument_PrecisionTooLarge, StandardFormat.MaxPrecision));
703return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_Attribute, attribute));
708return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_CustomAttributeData, customAttributeData));
746return 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));