diff --git a/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts b/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts index a2e35702f..01065aa2c 100644 --- a/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts +++ b/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts @@ -104,8 +104,10 @@ export class SafeDsRunner { this.logging.outputInfo(`Using safe-ds-runner version: ${versionString}`); } } catch (error) { - this.logging.outputError(`Could not start runner: ${error}`); - this.logging.displayError('The runner process could not be started.'); + this.logging.outputError(`Could not start runner: ${error instanceof Error ? error.message : error}`); + this.logging.displayError( + `The runner process could not be started: ${error instanceof Error ? error.message : error}`, + ); return; } // Start the runner at the specified port @@ -414,6 +416,9 @@ export class SafeDsRunner { process.on('close', (code) => { reject(new Error(`The subprocess shut down: ${code}`)); }); + process.on('error', (err) => { + reject(new Error(`The subprocess could not be started (${err.message})`)); + }); }); } diff --git a/packages/safe-ds-vscode/src/extension/mainClient.ts b/packages/safe-ds-vscode/src/extension/mainClient.ts index dbc95b964..a7fb4976a 100644 --- a/packages/safe-ds-vscode/src/extension/mainClient.ts +++ b/packages/safe-ds-vscode/src/extension/mainClient.ts @@ -382,6 +382,9 @@ const registerVSCodeWatchers = function () { if (event.affectsConfiguration('safe-ds.runner.command')) { // Try starting runner logOutput('Safe-DS Runner Command was updated'); + services.runtime.Runner.updateRunnerCommand( + vscode.workspace.getConfiguration('safe-ds.runner').get('command')!, + ); if (!services.runtime.Runner.isPythonServerAvailable()) { services.runtime.Runner.startPythonServer(); } else {