Skip to content

Commit 6f2a449

Browse files
authored
Merge pull request #11 from carmineos/master
Replaced AspectRatioException with a warning printed in console
2 parents 8d93dc9 + 884eb73 commit 6f2a449

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

MenuAPI/MenuController.cs

Lines changed: 2 additions & 7 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>();
@@ -62,9 +57,9 @@ public static MenuAlignmentOption MenuAlignment
6257
// so (re)set it to be left aligned.
6358
_alignment = MenuAlignmentOption.Left;
6459

65-
// 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.
60+
// In case the value was being changed to be right aligned, 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)