mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Use string interpolation expression.
This commit is contained in:
@@ -299,7 +299,7 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
if(sectorAddress > ImageInfo.Sectors - 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(sectorAddress),
|
||||
string.Format("Sector address {0} not found", sectorAddress));
|
||||
$"Sector address {sectorAddress} not found");
|
||||
|
||||
byte[] sector;
|
||||
|
||||
@@ -312,9 +312,7 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
if((long)l1Off >= l1Table.LongLength)
|
||||
throw new ArgumentOutOfRangeException(nameof(l1Off),
|
||||
string
|
||||
.Format("Trying to read past L1 table, position {0} of a max {1}",
|
||||
l1Off, l1Table.LongLength));
|
||||
$"Trying to read past L1 table, position {l1Off} of a max {l1Table.LongLength}");
|
||||
|
||||
// TODO: Implement differential images
|
||||
if(l1Table[l1Off] == 0) return new byte[512];
|
||||
@@ -370,8 +368,7 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
if(read != clusterSize)
|
||||
throw new
|
||||
IOException(string.Format("Unable to decompress cluster, expected {0} bytes got {1}",
|
||||
clusterSize, read));
|
||||
IOException($"Unable to decompress cluster, expected {clusterSize} bytes got {read}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -399,7 +396,7 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
if(sectorAddress > ImageInfo.Sectors - 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(sectorAddress),
|
||||
string.Format("Sector address {0} not found", sectorAddress));
|
||||
$"Sector address {sectorAddress} not found");
|
||||
|
||||
if(sectorAddress + length > ImageInfo.Sectors)
|
||||
throw new ArgumentOutOfRangeException(nameof(length), "Requested more sectors than available");
|
||||
|
||||
Reference in New Issue
Block a user