diff --git a/components/lazutils/masks.pas b/components/lazutils/masks.pas index 918be5a795..e044530e5e 100644 --- a/components/lazutils/masks.pas +++ b/components/lazutils/masks.pas @@ -25,6 +25,8 @@ type TUtf8Char = String[7]; + EMaskError=class(EConvertError); + TMaskChar = record case CharType: TMaskCharType of mcChar: (CharValue: TUtf8Char); @@ -229,7 +231,7 @@ var procedure CharSetError; begin - raise EConvertError.CreateFmt(lrsInvalidCharSet, [AValue]); + raise EMaskError.CreateFmt(lrsInvalidCharSet, [AValue]); end; procedure AddAnyText; diff --git a/components/lazutils/test/testmasks.lpi b/components/lazutils/test/testmasks.lpi index 631039cca4..61446ae611 100644 --- a/components/lazutils/test/testmasks.lpi +++ b/components/lazutils/test/testmasks.lpi @@ -62,13 +62,7 @@ - - - - - - - + diff --git a/components/lazutils/test/testmasks.lpr b/components/lazutils/test/testmasks.lpr index d725a46a1c..f270f497f7 100644 --- a/components/lazutils/test/testmasks.lpr +++ b/components/lazutils/test/testmasks.lpr @@ -58,8 +58,8 @@ procedure TTestMask.TestMaskException(const S, Mask: String; AFail: Boolean); begin FS := S; FMask := Mask; - if AFail then // Exception type will be EMaskError - AssertException('Invalid syntax: ' + S + ' match ' + Mask + ': ', EConvertError, @Test) + if AFail then + AssertException('Invalid syntax: ' + S + ' match ' + Mask + ': ', EMaskError, @Test) else try Test;