Add error handing for managing extensions

This commit is contained in:
Cohee 2023-11-10 10:25:34 +02:00
parent 024581de84
commit 9a3d239e6d
1 changed files with 33 additions and 27 deletions

View File

@ -592,6 +592,7 @@ function getModuleInformation() {
* Generates the HTML strings for all extensions and displays them in a popup.
*/
async function showExtensionsDetails() {
try{
showLoader();
let htmlDefault = '<h3>Built-in Extensions:</h3>';
let htmlExternal = '<h3>Installed Extensions:</h3>';
@ -621,8 +622,13 @@ async function showExtensionsDetails() {
${htmlDefault}
${htmlExternal}
`;
hideLoader();
callPopup(`<div class="extensions_info">${html}</div>`, 'text');
} catch (error) {
toastr.error('Error loading extensions. See browser console for details.');
console.error(error);
} finally {
hideLoader();
}
}