Skip to content

Commit

Permalink
imp - Added more ColorTools safety guards for tests on CI
Browse files Browse the repository at this point in the history
---

We've added exception handlers to the main config color tools.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 23, 2024
1 parent 96236bd commit 9cff977
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions public/Nitrocid/Kernel/Configuration/Instances/KernelMainConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,17 @@ public bool UseConsoleColorPalette
/// </summary>
public bool AllowForegroundColor
{
get => KernelColorTools.allowForeground;
get
{
try
{
return KernelColorTools.allowForeground;
}
catch
{
return true;
}
}
set
{
try
Expand All @@ -422,7 +432,17 @@ public bool AllowForegroundColor
/// </summary>
public bool AllowBackgroundColor
{
get => KernelColorTools.allowBackground;
get
{
try
{
return KernelColorTools.allowBackground;
}
catch
{
return true;
}
}
set
{
try
Expand Down

0 comments on commit 9cff977

Please sign in to comment.