fix some exception types

can these even occur?
This commit is contained in:
Morilli 2024-08-29 05:39:32 +02:00
parent 6d9c74b7ea
commit b4bcb5755d
1 changed files with 2 additions and 2 deletions

View File

@ -490,7 +490,7 @@ namespace BizHawk.Client.Common.RamSearchEngine
private IEnumerable<IMiniWatch> CompareChanges(IEnumerable<IMiniWatch> watchList)
{
if (!_settings.IsDetailed()) throw new InvalidCastException(); //TODO matches previous behaviour; was this intended to skip processing? --yoshi
if (CompareValue is not uint compareValue) throw new InvalidCastException(); //TODO typo for IOE?
if (CompareValue is not uint compareValue) throw new InvalidOperationException();
switch (Operator)
{
default:
@ -528,7 +528,7 @@ namespace BizHawk.Client.Common.RamSearchEngine
private IEnumerable<IMiniWatch> CompareDifference(IEnumerable<IMiniWatch> watchList)
{
if (CompareValue is not uint compareValue) throw new InvalidCastException(); //TODO typo for IOE?
if (CompareValue is not uint compareValue) throw new InvalidOperationException();
if (_settings.Type is not WatchDisplayType.Float)
{
switch (Operator)