Skip to content

Commit a8819c0

Browse files
Fix order of exception args
1 parent ba5fb71 commit a8819c0

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

Runtime/MediaController/Core/Exceptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public BcpParseException(
2323
Exception innerException = null
2424
)
2525
: base(
26-
$"Failed to parse bcp message: '{(culprit?.ToString() ?? "Unknown")}' "
27-
+ $"Reason: {(failReason ?? "None given")}",
26+
$"Failed to parse bcp message: '{culprit?.ToString() ?? "Unknown"}' "
27+
+ $"Reason: {failReason ?? "None given"}",
2828
innerException
2929
)
3030
{

Runtime/MediaController/Messages/Device/Autofire/AutofireDeviceMessageHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected override void HandleAttributeChange(DeviceAttributeChange change)
2525
if (change.AttributeName == nameof(AutofireDeviceMessage.StateJson.enabled))
2626
EnabledChanged?.Invoke(this, change.GetEventArgsForPrimitiveTypes<bool>());
2727
else
28-
throw new UnknownDeviceAttributeException(Type, change.AttributeName);
28+
throw new UnknownDeviceAttributeException(change.AttributeName, Type);
2929
}
3030
}
3131
}

Runtime/MediaController/Messages/Device/BallDevice/BallDeviceMessageHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected override void HandleAttributeChange(DeviceAttributeChange change)
4343
BallsChanged?.Invoke(this, change.GetEventArgsForPrimitiveTypes<int>());
4444
break;
4545
default:
46-
throw new UnknownDeviceAttributeException(Type, change.AttributeName);
46+
throw new UnknownDeviceAttributeException(change.AttributeName, Type);
4747
}
4848
}
4949
}

Runtime/MediaController/Messages/Device/ComboSwitch/ComboSwitchDeviceMessageHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected override void HandleAttributeChange(DeviceAttributeChange change)
2828
change.GetEventArgsForPrimitiveTypes<ComboSwitchStatus>()
2929
);
3030
else
31-
throw new UnknownDeviceAttributeException(Type, change.AttributeName);
31+
throw new UnknownDeviceAttributeException(change.AttributeName, Type);
3232
}
3333
}
3434
}

Runtime/MediaController/Messages/Device/Flipper/FlipperDeviceMessageHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected override void HandleAttributeChange(DeviceAttributeChange change)
2525
if (change.AttributeName == nameof(FlipperDeviceMessage.StateJson.enabled))
2626
EnabledChanged?.Invoke(this, change.GetEventArgsForPrimitiveTypes<bool>());
2727
else
28-
throw new UnknownDeviceAttributeException(Type, change.AttributeName);
28+
throw new UnknownDeviceAttributeException(change.AttributeName, Type);
2929
}
3030
}
3131
}

Runtime/MediaController/Messages/Device/Playfield/PlayfieldDeviceMessageHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected override void HandleAttributeChange(DeviceAttributeChange change)
4343
BallsChanged?.Invoke(this, change.GetEventArgsForPrimitiveTypes<int>());
4444
break;
4545
default:
46-
throw new UnknownDeviceAttributeException(Type, change.AttributeName);
46+
throw new UnknownDeviceAttributeException(change.AttributeName, Type);
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)