/
githubmirror
/
shadowsocks-windows
Обзор
Документация
Войти
/
githubmirror
/
shadowsocks-windows
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v4
shadowsocks-csharp/Util/SystemProxy/ProxyException.cs
59 строк
1 KB
StudentEx
Refine sysproxy exception handling.
30 сен 2018, 07:20
30 сен 2018, 07:20
060bbe1
Код
Авторство
О чём код?
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace Shadowsocks.Util.SystemProxy { enum ProxyExceptionType { Unspecific, FailToRun, QueryReturnEmpty, SysproxyExitError, QueryReturnMalformed } class ProxyException : Exception { // provide more specific information about exception public ProxyExceptionType Type { get; } public ProxyException() { } public ProxyException(string message) : base(message) { } public ProxyException(string message, Exception innerException) : base(message, innerException) { } protected ProxyException(SerializationInfo info, StreamingContext context) : base(info, context) { } public ProxyException(ProxyExceptionType type) { this.Type = type; } public ProxyException(ProxyExceptionType type, string message) : base(message) { this.Type = type; } public ProxyException(ProxyExceptionType type, string message, Exception innerException) : base(message, innerException) { this.Type = type; } protected ProxyException(ProxyExceptionType type, SerializationInfo info, StreamingContext context) : base(info, context) { this.Type = type; } } }