editormacroscript: fixed compilation

git-svn-id: trunk@45134 -
This commit is contained in:
mattias 2014-05-21 11:23:48 +00:00
parent d84e4a5a95
commit be15685e52

View File

@ -6,6 +6,9 @@ interface
uses
Classes, SysUtils, SrcEditorIntf, IDEMsgIntf, LazIDEIntf, IDEOptionsIntf,
{$IFDEF EnableNewExtTools}
IDEExternToolIntf,
{$ENDIF}
Controls, SynEdit, EMScriptClasses, EMSStrings, Laz2_XMLCfg, uPSRuntime,
uPSUtils, LazLoggerBase, LazFileUtils;
@ -297,7 +300,11 @@ begin
Exec.RunScript;
except
on e: Exception do
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluError,Format('%s: %s', [e.ClassName, e.Message]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format('%s: %s', [e.ClassName, e.Message]), '', -1);
{$ENDIF}
end;
if Exec.ExceptionCode <> erNoError then begin
ExObj := Exec.ExceptionObject;
@ -311,7 +318,11 @@ begin
y := 0;
Exec.TranslatePositionEx(Exec.ExceptionProcNo, Exec.ExceptionPos, i, x, y, s2);
if IDEMessagesWindow <> nil then
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluError,Format('%s: "%s" at %d/%d', [s, Exec.ExceptionString, x,y]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format('%s: "%s" at %d/%d', [s, Exec.ExceptionString, x,y]), '', -1);
{$ENDIF}
end;
finally