Display error message if script couldn't save. Stop success from blocking dialog close.
This commit is contained in:
parent
78168e94a5
commit
e4531321b1
1 changed files with 18 additions and 9 deletions
|
@ -171,6 +171,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Save()
|
private async Task Save()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var value = await Editor.GetValue();
|
var value = await Editor.GetValue();
|
||||||
|
|
||||||
|
@ -181,6 +183,13 @@
|
||||||
else
|
else
|
||||||
Script = await ScriptService.Update(Script);
|
Script = await ScriptService.Update(Script);
|
||||||
|
|
||||||
await MessageService.Success("Script saved!");
|
MessageService.Success("Script saved!");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageService.Error("Script could not be saved!");
|
||||||
|
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue