Skip to content

Commit 2a0bf82

Browse files
committed
Replaced AspectRatioException with a warning printed in console
1 parent 8d93dc9 commit 2a0bf82

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

MenuAPI/MenuController.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88

99
namespace MenuAPI
1010
{
11-
public class AspectRatioException : Exception
12-
{
13-
public AspectRatioException(string message) : base(message) { }
14-
}
15-
1611
public class MenuController : BaseScript
1712
{
1813
public static List<Menu> Menus { get; protected set; } = new List<Menu>();
@@ -64,7 +59,7 @@ public static MenuAlignmentOption MenuAlignment
6459

6560
// In case the value was being changed to be right aligned, throw an exception so the resource can handle this and notify the user properly.
6661
if (value == MenuAlignmentOption.Right)
67-
throw new AspectRatioException("Right aligned menus are not supported for aspect ratios 17:9 or 21:9.");
62+
Debug.WriteLine($"[MenuAPI ({GetCurrentResourceName()})] Warning: Right aligned menus are not supported for aspect ratios 17:9 or 21:9, left aligned will be used instead.");
6863
}
6964
}
7065
}

0 commit comments

Comments
 (0)