Skip to content

Commit

Permalink
Show the color model name in the error message (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Oct 20, 2019
1 parent 12f5d10 commit 91aedc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WpfMath/TexFormulaParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,8 @@ private Color ReadColorModelData(SourceSpan value, ref int position)

var color = colorParser.Parse(colorComponents);
if (color == null)
throw new TexParseException($"Color {colorDefinition} could neither be found nor converted.");
throw new TexParseException(
$"Color {colorDefinition} could not be parsed by the {colorModelName ?? "default"} color model.");

return color.Value;
}
Expand Down

0 comments on commit 91aedc1

Please sign in to comment.