Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Source/uPSCompiler.pas
Original file line number Diff line number Diff line change
Expand Up @@ -12593,8 +12593,14 @@ function TPSPascalCompiler.Compile(const s: tbtString): Boolean;
except
on e: Exception do
begin
MakeError('', ecCustomError, tbtstring(e.Message));
{$IFNDEF PS_USESSUPPORT}
MakeError('', ecCustomError, tbtstring(e.Message)); // still attributed to the used unit
{$IFDEF PS_USESSUPPORT}
// restore what the regular failure path above restores: a stale
// fModule survives Cleanup and makes every following Compile of
// this instance fail with a bogus cross-reference error
FParser:=ParserPos;
fModule:=OldFileName;
{$ELSE}
FUses.Free;
{$ENDIF}
Result := False;
Expand Down