Improve repo exception handling
This commit is contained in:
parent
c5acb2ca54
commit
1b415d7a7f
@ -19,8 +19,12 @@ namespace Pal.Client.DependencyInjection
|
|||||||
{
|
{
|
||||||
chat.Error(string.Format(Localization.Error_WrongRepository,
|
chat.Error(string.Format(Localization.Error_WrongRepository,
|
||||||
"https://github.com/carvelli/Dalamud-Plugins"));
|
"https://github.com/carvelli/Dalamud-Plugins"));
|
||||||
throw new InvalidOperationException();
|
throw new RepoVerificationFailedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal sealed class RepoVerificationFailedException : Exception
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,12 +102,9 @@ namespace Pal.Client
|
|||||||
_rootScopeCompletionSource.SetResult(_rootScope);
|
_rootScopeCompletionSource.SetResult(_rootScope);
|
||||||
_loadState = ELoadState.Loaded;
|
_loadState = ELoadState.Loaded;
|
||||||
}
|
}
|
||||||
catch (ObjectDisposedException e)
|
catch (Exception e) when (e is ObjectDisposedException
|
||||||
{
|
or OperationCanceledException
|
||||||
_rootScopeCompletionSource.SetException(e);
|
or RepoVerification.RepoVerificationFailedException)
|
||||||
_loadState = ELoadState.Error;
|
|
||||||
}
|
|
||||||
catch (OperationCanceledException e)
|
|
||||||
{
|
{
|
||||||
_rootScopeCompletionSource.SetException(e);
|
_rootScopeCompletionSource.SetException(e);
|
||||||
_loadState = ELoadState.Error;
|
_loadState = ELoadState.Error;
|
||||||
|
Loading…
Reference in New Issue
Block a user