mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Try use ReadOnlySpan<char> instead of String for applicable API - Use Customized Exception to return error result
31 lines
869 B
C#
31 lines
869 B
C#
using System;
|
|
using Flow.Launcher.Plugin.Explorer.Search.IProvider;
|
|
|
|
namespace Flow.Launcher.Plugin.Explorer.Exceptions;
|
|
|
|
public class EngineNotAvailableException : Exception
|
|
{
|
|
public string EngineName { get; }
|
|
public string Resolution { get; }
|
|
public EngineNotAvailableException(string engineName,
|
|
string resolution,
|
|
string message) : base(message)
|
|
{
|
|
EngineName = engineName;
|
|
Resolution = resolution;
|
|
}
|
|
|
|
public EngineNotAvailableException(string engineName,
|
|
string resolution,
|
|
string message,
|
|
Exception innerException) : base(message, innerException)
|
|
{
|
|
EngineName = engineName;
|
|
Resolution = resolution;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"Engine {EngineName} is not available.\n Try to {Resolution}\n {base.ToString()}";
|
|
}
|
|
}
|