Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ee43a12

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
fix: show no errors if users cancel lib install
Throwing and catching a `UserAbortError` is part of the natural flow. Closes #2063 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 31deeeb commit ee43a12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎arduino-ide-extension/src/browser/widgets/component-list/filterable-list-container.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '../../../common/protocol/installable';
1414
import { ArduinoComponent } from '../../../common/protocol/arduino-component';
1515
import { SearchBar } from './search-bar';
16-
import { ListWidget } from './list-widget';
16+
import { ListWidget,UserAbortError } from './list-widget';
1717
import { ComponentList } from './component-list';
1818
import { ListItemRenderer } from './list-item-renderer';
1919
import {
@@ -148,6 +148,11 @@ export class FilterableListContainer<
148148
try {
149149
await install({ item, progressId, version });
150150
} catch (err) {
151+
if (err instanceof UserAbortError) {
152+
// Do not toast an error message on user abort.
153+
// https://github.com/arduino/arduino-ide/issues/2063
154+
return;
155+
}
151156
const message = LibraryPackage.is(item) // TODO: this dispatch does not belong here
152157
? libraryInstallFailed(name, version)
153158
: platformInstallFailed(name, version);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /