Skip to content

Commit

Permalink
Merge pull request #459 from KxSystems/ee-fixes
Browse files Browse the repository at this point in the history
[dev-to-main] Fixed bundled connect error message
  • Loading branch information
ecmel authored Nov 18, 2024
2 parents 50beb02 + 0fbb8c7 commit adbacf4
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions src/classes/localConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,31 @@ export class LocalConnection {
if (err || !conn) {
ext.serverProvider.reload();

window.showErrorMessage(
`Connection to server ${this.options.host}:${this.options.port} failed! Details: ${err?.message}`,
);
if (this.connLabel.endsWith("[local]")) {
window
.showErrorMessage(
`Connection to server ${this.options.host}:${this.options.port} failed.`,
"Start q process",
)
.then((res) => {
if (res) {
commands.executeCommand(
"kdb.startLocalProcess",
ext.connectionsList.find(
(conn) => conn.label === this.connLabel,
),
);
}
});
} else {
window.showErrorMessage(
`Connection to server ${this.options.host}:${this.options.port} failed.`,
);
}

kdbOutputLog(
`Connection to server ${this.options.host}:${this.options.port} failed! Details: ${err?.message}`,
"ERROR",
"CONNECTION",
);
return;
}
Expand Down

0 comments on commit adbacf4

Please sign in to comment.