mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-09 16:40:10 +01:00
Add error handing for managing extensions
This commit is contained in:
parent
024581de84
commit
9a3d239e6d
@ -592,6 +592,7 @@ function getModuleInformation() {
|
|||||||
* Generates the HTML strings for all extensions and displays them in a popup.
|
* Generates the HTML strings for all extensions and displays them in a popup.
|
||||||
*/
|
*/
|
||||||
async function showExtensionsDetails() {
|
async function showExtensionsDetails() {
|
||||||
|
try{
|
||||||
showLoader();
|
showLoader();
|
||||||
let htmlDefault = '<h3>Built-in Extensions:</h3>';
|
let htmlDefault = '<h3>Built-in Extensions:</h3>';
|
||||||
let htmlExternal = '<h3>Installed Extensions:</h3>';
|
let htmlExternal = '<h3>Installed Extensions:</h3>';
|
||||||
@ -621,8 +622,13 @@ async function showExtensionsDetails() {
|
|||||||
${htmlDefault}
|
${htmlDefault}
|
||||||
${htmlExternal}
|
${htmlExternal}
|
||||||
`;
|
`;
|
||||||
hideLoader();
|
|
||||||
callPopup(`<div class="extensions_info">${html}</div>`, 'text');
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user