Specify the parameter for argument-based exceptions. Correct the parameter names of others.
Common mistake.
This commit is contained in:
parent
186f28a2fe
commit
abbee1672e
|
@ -276,7 +276,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public void SetAudioParameters(int sampleRate, int channels, int bits)
|
||||
{
|
||||
if (bits != 16)
|
||||
throw new ArgumentOutOfRangeException("sampling depth must be 16 bits!");
|
||||
throw new ArgumentOutOfRangeException("bits", "Sampling depth must be 16 bits!");
|
||||
this.sampleRate = sampleRate;
|
||||
this.channels = channels;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
static void WriteVarU(int v, Stream stream)
|
||||
{
|
||||
if (v < 0)
|
||||
throw new ArgumentOutOfRangeException("unsigned must be non-negative");
|
||||
throw new ArgumentOutOfRangeException("v", "unsigned must be non-negative");
|
||||
WriteVarU((ulong)v, stream);
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
static void WriteVarU(long v, Stream stream)
|
||||
{
|
||||
if (v < 0)
|
||||
throw new ArgumentOutOfRangeException("unsigned must be non-negative");
|
||||
throw new ArgumentOutOfRangeException("v", "unsigned must be non-negative");
|
||||
WriteVarU((ulong)v, stream);
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public void SetAudioParameters(int sampleRate, int channels, int bits)
|
||||
{
|
||||
if (bits != 16)
|
||||
throw new ArgumentOutOfRangeException("audio depth must be 16 bit!");
|
||||
throw new ArgumentOutOfRangeException("bits", "Audio depth must be 16 bit!");
|
||||
this.sampleRate = sampleRate;
|
||||
this.channels = channels;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls
|
|||
public void SetButtons(string[] names, DialogResult[] results, int def)
|
||||
{
|
||||
if (names == null)
|
||||
throw new ArgumentNullException("btnText", "Button Text is null");
|
||||
throw new ArgumentNullException("names", "Button Text is null");
|
||||
|
||||
int count = names.Length;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
{
|
||||
if (scanline < 0 || scanline > 227)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Scanline must be in [0, 227]!");
|
||||
throw new ArgumentOutOfRangeException("scanline", "Scanline must be in [0, 227]!");
|
||||
}
|
||||
|
||||
if (callback == null)
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
{
|
||||
if (scanline < 0 || scanline > 227)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Scanline must be in [0, 227]!");
|
||||
throw new ArgumentOutOfRangeException("scanline", "Scanline must be in [0, 227]!");
|
||||
}
|
||||
if (callback == null)
|
||||
{
|
||||
|
|
|
@ -520,7 +520,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
LibGambatte.gambatte_setscanlinecallback(GambatteState, scanlinecb, line);
|
||||
}
|
||||
else
|
||||
throw new ArgumentOutOfRangeException("line must be in [0, 153]");
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("line", "line must be in [0, 153]");
|
||||
}
|
||||
}
|
||||
|
||||
LibGambatte.ScanlineCallback scanlinecb;
|
||||
|
|
Loading…
Reference in New Issue