mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 20:21:04 +02:00
MaskEdit: new exception type for errors in EditMask.
git-svn-id: trunk@64903 -
This commit is contained in:
parent
bf15a643ab
commit
9124789bc5
@ -146,6 +146,7 @@ type
|
|||||||
{ Exception class }
|
{ Exception class }
|
||||||
type
|
type
|
||||||
EDBEditError = class(Exception);
|
EDBEditError = class(Exception);
|
||||||
|
EInvalidEditMask = class(EDBEditError);
|
||||||
//Utf8 handling errors
|
//Utf8 handling errors
|
||||||
EInvalidUtf8 = class(Exception);
|
EInvalidUtf8 = class(Exception);
|
||||||
EInvalidCodePoint = class(EInvalidUtf8);
|
EInvalidCodePoint = class(EInvalidUtf8);
|
||||||
@ -690,7 +691,7 @@ begin
|
|||||||
if InSet then
|
if InSet then
|
||||||
begin //InSet
|
begin //InSet
|
||||||
if (Length(CP) <> 1) then
|
if (Length(CP) <> 1) then
|
||||||
raise EDBEditError.Create(SIllegalCharInSet);
|
raise EInvalidEditMask.Create(SIllegalCharInSet);
|
||||||
case CP[1] of
|
case CP[1] of
|
||||||
cMask_SetNegate:
|
cMask_SetNegate:
|
||||||
begin
|
begin
|
||||||
@ -712,7 +713,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
//debugln('Set closed:');
|
//debugln('Set closed:');
|
||||||
if (CharSet = []) then
|
if (CharSet = []) then
|
||||||
raise EDBEditError.Create(SEmptySet);
|
raise EInvalidEditMask.Create(SEmptySet);
|
||||||
//debugln(['IsNegative=',IsNegative]);
|
//debugln(['IsNegative=',IsNegative]);
|
||||||
if IsNegative then
|
if IsNegative then
|
||||||
begin
|
begin
|
||||||
@ -741,7 +742,7 @@ begin
|
|||||||
cMask_SetRange:
|
cMask_SetRange:
|
||||||
begin
|
begin
|
||||||
if InRange then
|
if InRange then
|
||||||
raise EDBEditError.Create(SIllegalRangeChar);
|
raise EInvalidEditMask.Create(SIllegalRangeChar);
|
||||||
if (CharSet = []) then
|
if (CharSet = []) then
|
||||||
begin
|
begin
|
||||||
//debugln('Adding - to emty set');
|
//debugln('Adding - to emty set');
|
||||||
@ -927,7 +928,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if InSet then
|
if InSet then
|
||||||
raise EDBEditError.Create(SUnclosedSet);
|
raise EInvalidEditMask.Create(SUnclosedSet);
|
||||||
|
|
||||||
//debugln('TCustomMaskEdit.SetEditMask: Internal Mask:');
|
//debugln('TCustomMaskEdit.SetEditMask: Internal Mask:');
|
||||||
//debugln(DbgS(FMask));
|
//debugln(DbgS(FMask));
|
||||||
|
Loading…
Reference in New Issue
Block a user