From 067f6363fee18c1a6642897234213dc211a8537c Mon Sep 17 00:00:00 2001 From: "John P (Dgby714)" Date: Sun, 10 Oct 2010 17:18:23 -0400 Subject: [PATCH] Simba: Catch exceptions in GetClipBoard and SetClipBoard --- Units/MMLAddon/PSInc/Wrappers/other.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Units/MMLAddon/PSInc/Wrappers/other.inc b/Units/MMLAddon/PSInc/Wrappers/other.inc index 8b93ab8..80b40a7 100644 --- a/Units/MMLAddon/PSInc/Wrappers/other.inc +++ b/Units/MMLAddon/PSInc/Wrappers/other.inc @@ -267,10 +267,20 @@ end; procedure ps_SetClipBoard(const Data: string); extdecl; begin - Clipboard.AsText := Data; + try + Clipboard.AsText := Data; + except + on e: exception do + mDebugLn('Exception in SetClipBoard: ' + e.message); + end; end; function ps_GetClipBoard: string; extdecl; begin - Result := Clipboard.AsText; + try + Result := Clipboard.AsText; + except + on e: exception do + mDebugLn('Exception in GetClipBoard: ' + e.message); + end; end;