Interface.patch (1,963 bytes)
From f9ef102122b642df9a90732189e193196500bd33 Mon Sep 17 00:00:00 2001
From: Henrique Gottardi Werlang <henriquewerlang@hotmail.com>
Date: Thu, 13 Aug 2020 09:12:55 -0300
Subject: [PATCH] Ajuste interface.
---
utils/pas2js/libstub.pp | 10 +---------
utils/pas2js/stubcreator.pp | 10 +++++-----
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/utils/pas2js/libstub.pp b/utils/pas2js/libstub.pp
index 7033b9c568..ab5fb4a103 100644
--- a/utils/pas2js/libstub.pp
+++ b/utils/pas2js/libstub.pp
@@ -123,15 +123,7 @@ end;
Function ExecuteStubCreator(P : PStubCreator) : Boolean; stdcall;
begin
- Result:=False;
- try
- TStubCreator(P).Execute;
- Result:=True;
- except
- On E: Exception do
- Writeln('Exception ',E.ClassName,' ',E.Message);
- // Ignore
- end;
+ Result:=TStubCreator(P).Execute;
end;
Procedure GetStubCreatorLastError(P : PStubCreator; AError : PAnsiChar;
diff --git a/utils/pas2js/stubcreator.pp b/utils/pas2js/stubcreator.pp
index 96a19ba84c..39e0ce4aec 100644
--- a/utils/pas2js/stubcreator.pp
+++ b/utils/pas2js/stubcreator.pp
@@ -80,7 +80,7 @@ type
Public
Constructor Create(AOwner : TComponent); override;
Destructor Destroy; override;
- Procedure Execute;
+ Function Execute: Boolean;
Procedure GetLastError(Out AError,AErrorClass : String);
// Streams take precedence over filenames. They will be freed on destroy!
// OutputStream can be used combined with write callbacks.
@@ -227,22 +227,22 @@ begin
Include(O,woForwardClasses);
end;
-procedure TStubCreator.Execute;
-
-
+function TStubCreator.Execute: Boolean;
begin
FLastErrorClass:='';
FLastError:='';
+ Result := False;
if Defines.IndexOf('MakeStub')=-1 then
Try
DoExecute;
+
+ Result := True;
except
On E : Exception do
begin
FLastErrorClass:=E.Classname;
FLastError:=E.Message;
- Raise;
end;
end;
end;
--
2.28.0.windows.1