Improve error messsages for `forms.draw{Icon,Image,ImageRegion}`

This commit is contained in:
YoshiRulz 2025-01-04 00:20:02 +10:00
parent 6ffc71b183
commit 82b22266b0
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 5 additions and 4 deletions

View File

@ -527,9 +527,10 @@ namespace BizHawk.Client.EmuHawk
int? width = null,
int? height = null)
{
const string FUNC_NAME = "forms.drawIcon";
if (!File.Exists(path))
{
LogOutputCallback($"File not found: {path}\nScript Terminated");
LogOutputCallback($"{FUNC_NAME}: file \"{path}\" not found");
return;
}
try
@ -543,7 +544,7 @@ namespace BizHawk.Client.EmuHawk
y: y,
width: width,
height: height,
functionName: "forms.drawIcon");
functionName: FUNC_NAME);
}
else if (match is Form)
{
@ -575,7 +576,7 @@ namespace BizHawk.Client.EmuHawk
{
if (!File.Exists(path))
{
LogOutputCallback($"File not found: {path}\nScript Terminated");
LogOutputCallback($"forms.drawImage: file \"{path}\" not found");
return;
}
try
@ -637,7 +638,7 @@ namespace BizHawk.Client.EmuHawk
{
if (!File.Exists(path))
{
LogOutputCallback($"File not found: {path}\nScript Terminated");
LogOutputCallback($"forms.drawImageRegion: file \"{path}\" not found");
return;
}
try