mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
removed fragile error handling
This commit is contained in:
parent
b556dac2c1
commit
a6f1981afb
2 changed files with 8 additions and 6 deletions
|
|
@ -87,18 +87,18 @@ namespace Flow.Launcher.Plugin.Explorer.Helper
|
|||
case ElementAlreadyExistsException:
|
||||
api.ShowMsgError(string.Format(api.GetTranslation("plugin_explorer_element_already_exists"), NewFileName));
|
||||
break;
|
||||
case IOException iOException:
|
||||
if (iOException.Message.Contains("incorrect"))
|
||||
default:
|
||||
string msg = exception.Message;
|
||||
if (!string.IsNullOrEmpty(msg))
|
||||
{
|
||||
api.ShowMsgError(string.Format(api.GetTranslation("plugin_explorer_invalid_name"), NewFileName));
|
||||
api.ShowMsgError(string.Format(api.GetTranslation("plugin_explorer_exception"), exception.Message));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
goto default;
|
||||
api.ShowMsgError(api.GetTranslation("plugin_explorer_no_reason_given_exception"));
|
||||
}
|
||||
default:
|
||||
api.ShowMsgError(exception.ToString());
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,4 +203,6 @@
|
|||
<system:String x:Key="plugin_explorer_successful_rename">Successfully renamed it to: {0}</system:String>
|
||||
<system:String x:Key="plugin_explorer_element_already_exists">There is already a file with the name: {0} in this location</system:String>
|
||||
<system:String x:Key="plugin_explorer_failed_to_open_rename_dialog">Failed to open rename dialog.</system:String>
|
||||
<system:String x:Key="plugin_explorer_exception">An error occured: {0}.</system:String>
|
||||
<system:String x:Key="plugin_explorer_no_reason_given_exception">An error occured and no reason was given.</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue