mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-28 12:02:15 -05:00
Simba: Catch exceptions in GetClipBoard and SetClipBoard
This commit is contained in:
parent
7f23ae10b5
commit
067f6363fe
@ -267,10 +267,20 @@ end;
|
|||||||
|
|
||||||
procedure ps_SetClipBoard(const Data: string); extdecl;
|
procedure ps_SetClipBoard(const Data: string); extdecl;
|
||||||
begin
|
begin
|
||||||
|
try
|
||||||
Clipboard.AsText := Data;
|
Clipboard.AsText := Data;
|
||||||
|
except
|
||||||
|
on e: exception do
|
||||||
|
mDebugLn('Exception in SetClipBoard: ' + e.message);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_GetClipBoard: string; extdecl;
|
function ps_GetClipBoard: string; extdecl;
|
||||||
begin
|
begin
|
||||||
|
try
|
||||||
Result := Clipboard.AsText;
|
Result := Clipboard.AsText;
|
||||||
|
except
|
||||||
|
on e: exception do
|
||||||
|
mDebugLn('Exception in GetClipBoard: ' + e.message);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user