stop throwing exceptions for color validation
This commit is contained in:
@@ -26,15 +26,7 @@ namespace QuestPDF.Helpers
|
||||
|
||||
static bool IsColorValid(string color)
|
||||
{
|
||||
try
|
||||
{
|
||||
SKColor.Parse(color);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return SKColor.TryParse(color, out _);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user