mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(user-menu) imrove error output
This commit is contained in:
parent
f80f87d77d
commit
070ccc4fbb
1 changed files with 8 additions and 4 deletions
|
|
@ -75,9 +75,8 @@ async function show() {
|
|||
function fillTemplate(options) {
|
||||
const result = [];
|
||||
|
||||
for (const option of options) {
|
||||
for (const option of options)
|
||||
result.push(`<option>${option}</option>`);
|
||||
}
|
||||
|
||||
return result.join('');
|
||||
}
|
||||
|
|
@ -125,7 +124,12 @@ const runUserMenu = async (value, options, userMenu) => {
|
|||
tryToCatch,
|
||||
});
|
||||
|
||||
if (e)
|
||||
Dialog.alert(e.stack);
|
||||
if (!e)
|
||||
return;
|
||||
|
||||
if (e.name === 'Error')
|
||||
return Dialog.alert(e.message);
|
||||
|
||||
return Dialog.alert(e.stack);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue