Flow.Launcher/Plugins/Flow.Launcher.Plugin.Explorer/Exceptions/SearchException.cs
Hongtao Zhang 8b1c125bdf
Custom Exception & Some Refactor
- Try use ReadOnlySpan<char> instead of String for applicable API
- Use Customized Exception to return error result
2022-09-21 19:18:20 -05:00

23 lines
638 B
C#

using System;
namespace Flow.Launcher.Plugin.Explorer.Exceptions
{
public class SearchException : Exception
{
public string EngineName { get; }
public SearchException(string engineName, string message) : base(message)
{
EngineName = engineName;
}
public SearchException(string engineName, string message, Exception innerException) : base(message, innerException)
{
EngineName = engineName;
}
public override string ToString()
{
return $"{EngineName} Search Exception:\n {base.ToString()}";
}
}
}