mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-16 05:39:28 +00:00
ATL-653: Added error handling for core/lib install
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -254,7 +254,11 @@ export class BoardsServiceImpl extends CoreClientAware implements BoardsService
|
||||
});
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
resp.on('end', resolve);
|
||||
resp.on('error', reject);
|
||||
resp.on('error', error => {
|
||||
this.outputService.append({ chunk: `Failed to install platform: ${item.id}.\n` });
|
||||
this.outputService.append({ chunk: error.toString() });
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
|
||||
const items = await this.search({});
|
||||
|
||||
@@ -183,7 +183,11 @@ export class LibraryServiceImpl extends CoreClientAware implements LibraryServic
|
||||
});
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
resp.on('end', resolve);
|
||||
resp.on('error', reject);
|
||||
resp.on('error', error => {
|
||||
this.outputService.append({ chunk: `Failed to install library: ${item.name}${version ? `:${version}` : ''}.\n` });
|
||||
this.outputService.append({ chunk: error.toString() });
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
|
||||
const items = await this.search({});
|
||||
|
||||
Reference in New Issue
Block a user