]> source.dussan.org Git - nextcloud-server.git/commitdiff
Continue registering and loading other dashboard widgets when one failed creation 34831/head
authorJoas Schilling <coding@schilljs.com>
Thu, 27 Oct 2022 05:10:57 +0000 (07:10 +0200)
committerJoas Schilling <coding@schilljs.com>
Thu, 27 Oct 2022 05:20:16 +0000 (07:20 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Dashboard/Manager.php

index 2aeedf3174ec6a7d8081161fcdf150cce065680f..a2dcf42941bbddbe2a4b6f1699f06e6b34fb252e 100644 (file)
@@ -82,9 +82,10 @@ class Manager implements IManager {
                                 * we can not inject it. Thus the static call.
                                 */
                                \OC::$server->get(LoggerInterface::class)->critical(
-                                       'Could not load lazy dashboard widget: ' . $e->getMessage(),
-                                       ['excepiton' => $e]
+                                       'Could not load lazy dashboard widget: ' . $service['class'],
+                                       ['exception' => $e]
                                );
+                               continue;
                        }
                        /**
                         * Try to register the loaded reporter. Theoretically it could be of a wrong
@@ -98,9 +99,10 @@ class Manager implements IManager {
                                 * we can not inject it. Thus the static call.
                                 */
                                \OC::$server->get(LoggerInterface::class)->critical(
-                                       'Could not register lazy dashboard widget: ' . $e->getMessage(),
+                                       'Could not register lazy dashboard widget: ' . $service['class'],
                                        ['exception' => $e]
                                );
+                               continue;
                        }
 
                        try {
@@ -119,9 +121,10 @@ class Manager implements IManager {
                                }
                        } catch (Throwable $e) {
                                \OC::$server->get(LoggerInterface::class)->critical(
-                                       'Error during dashboard widget loading: ' . $e->getMessage(),
+                                       'Error during dashboard widget loading: ' . $service['class'],
                                        ['exception' => $e]
                                );
+                               continue;
                        }
                }
                $this->lazyWidgets = [];