File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -480,9 +480,7 @@ class Pluginmanager{
480480 const foundPlugins = { } ;
481481 queries . push ( this . query ( ) . then ( ( plugins ) => {
482482 if ( ! plugins || ! ( plugins instanceof Array ) ) {
483- if ( alarmhandler . isBlocked ( LOCAL_TYPES . connectionLost ) ) return ;
484- Toast ( "unable to query plugins" ) ;
485- return ;
483+ throw new Error ( "no plugins returned" )
486484 }
487485 for ( let plugin of plugins ) {
488486 const name = plugin . name ;
@@ -494,7 +492,14 @@ class Pluginmanager{
494492 queries . push ( this . queryUser ( ) . then ( ( userFiles ) => {
495493 foundPlugins [ userFiles . name ] = userFiles ;
496494 } ) ) ;
497- await Promise . all ( queries ) ;
495+ try {
496+ await Promise . all ( queries ) ;
497+ } catch ( e ) {
498+ base . error ( "unable to query plugins" , e ) ;
499+ if ( alarmhandler . isBlocked ( LOCAL_TYPES . connectionLost ) ) return ;
500+ Toast ( "unable to query plugins" ) ;
501+ return ;
502+ }
498503 base . log ( "got plugin/user info" ) ;
499504 let unloadedJsChanges = false ;
500505 let updatedMjs = false ;
You can’t perform that action at this time.
0 commit comments