Skip to content

Commit e4b8781

Browse files
committed
Additional logging for server component installation
1 parent eeb9fe0 commit e4b8781

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/connection/serverComponent.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ export class ServerComponent {
105105
}
106106
});
107107

108+
ServerComponent.writeOutput(JSON.stringify(result));
109+
108110
const newAsset = result.data.assets.find(asset => asset.name.endsWith(`.jar`));
109111

110112
if (newAsset) {
@@ -141,7 +143,13 @@ export class ServerComponent {
141143

142144
} else {
143145
updateResult = UpdateStatus.FAILED;
144-
window.showErrorMessage(`Something went really wrong when trying to fetch your home directory.`);
146+
147+
this.writeOutput(JSON.stringify(commandResult));
148+
window.showErrorMessage(`Something went really wrong when trying to fetch your home directory.`).then(chosen => {
149+
if (chosen === `Show`) {
150+
this.outputChannel.show();
151+
}
152+
});
145153
}
146154
} else {
147155
updateResult = UpdateStatus.DECLINED_UPDATE;
@@ -158,8 +166,14 @@ export class ServerComponent {
158166
}
159167
} catch (e) {
160168
updateResult = UpdateStatus.FAILED;
161-
window.showErrorMessage(`Something went really wrong during the update process! ${e.message}`);
169+
ServerComponent.writeOutput(JSON.stringify(e));
162170
console.log(e);
171+
172+
window.showErrorMessage(`Something went really wrong during the update process! Check the Db2 for i Output log for the log`, `Show`).then(chosen => {
173+
if (chosen === `Show`) {
174+
this.outputChannel.show();
175+
}
176+
});
163177
}
164178

165179
return updateResult;

0 commit comments

Comments
 (0)