mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 15:56:10 +02:00
editormacroscript: fixed compilation
git-svn-id: trunk@45134 -
This commit is contained in:
parent
d84e4a5a95
commit
be15685e52
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user