mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:36:09 +02:00
FpDebug: Return errors when the debugger can't start.
This commit is contained in:
parent
0697e71dbf
commit
190b5e77a7
@ -2157,10 +2157,12 @@ begin
|
||||
|
||||
if FExecutableFilename = '' then begin
|
||||
DebugLn(DBG_WARNINGS, 'No filename given to execute.');
|
||||
FLastError := CreateError(fpInternalErr, ['No filename given to execute.']);
|
||||
Exit;
|
||||
end;
|
||||
if not FileExists(FExecutableFilename) then begin
|
||||
DebugLn(DBG_WARNINGS, 'File %s does not exist.',[FExecutableFilename]);
|
||||
FLastError := CreateError(fpInternalErr, ['File does not exist: ' + FExecutableFilename]);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
@ -2168,6 +2170,7 @@ begin
|
||||
CheckExecutableAndLoadClasses;
|
||||
if not Assigned(OsDbgClasses) then begin
|
||||
DebugLn(DBG_WARNINGS, 'Error - No support registered for debug target');
|
||||
FLastError := CreateError(fpInternalErr, ['Unknown target for file: ' + FExecutableFilename]);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
@ -2176,6 +2179,7 @@ begin
|
||||
|
||||
if not Assigned(Result) then begin
|
||||
DebugLn(DBG_WARNINGS, 'Error - could not create TDbgProcess');
|
||||
FLastError := CreateError(fpInternalErr, ['could not create TDbgProcess']);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user