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,
|
||||
"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);
|
||||
_loadState = ELoadState.Loaded;
|
||||
}
|
||||
catch (ObjectDisposedException e)
|
||||
{
|
||||
_rootScopeCompletionSource.SetException(e);
|
||||
_loadState = ELoadState.Error;
|
||||
}
|
||||
catch (OperationCanceledException e)
|
||||
catch (Exception e) when (e is ObjectDisposedException
|
||||
or OperationCanceledException
|
||||
or RepoVerification.RepoVerificationFailedException)
|
||||
{
|
||||
_rootScopeCompletionSource.SetException(e);
|
||||
_loadState = ELoadState.Error;
|
||||
|
Loading…
Reference in New Issue
Block a user