Skip to content

Commit

Permalink
Improved error messages for inaccessible implementation stores
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Sep 8, 2024
1 parent 978f117 commit 5061ed0
Show file tree
Hide file tree
Showing 20 changed files with 10 additions and 103 deletions.
9 changes: 6 additions & 3 deletions src/Store/Implementations/ImplementationStores.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public static IImplementationStore Default(ITaskHandler handler)
catch (IOException ex)
{
// Wrap exception to add context information
throw new IOException(string.Format(Resources.ProblemAccessingStore, path), ex);
throw new IOException(ProblemAccessingStoreMessage(path), ex);
}
catch (UnauthorizedAccessException ex)
{
// Wrap exception to add context information
throw new UnauthorizedAccessException(string.Format(Resources.ProblemAccessingStore, path), ex);
throw new UnauthorizedAccessException(ProblemAccessingStoreMessage(path), ex);
}
#endregion
}
Expand Down Expand Up @@ -171,14 +171,17 @@ select Environment.ExpandEnvironmentVariables(line))
catch (ArgumentException ex)
{
// Wrap exception to add context information
throw new IOException(string.Format(Resources.ProblemAccessingStoreEx, path, configPath), ex);
throw new IOException(ProblemAccessingStoreMessage(path), ex);
}
#endregion

yield return result;
}
}

private static string ProblemAccessingStoreMessage(string path)
=> string.Format(Resources.ProblemAccessingStore, path, $"0install store remove-dir {path.EscapeArgument()}");

/// <summary>
/// Sets the list of implementation directories in a specific configuration file.
/// </summary>
Expand Down
13 changes: 2 additions & 11 deletions src/Store/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.cs.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Zadává se v konfiguračním souboru '{1}'.</value>
<value>Došlo k problému s přístupem k úložišti implementace ‚‚{0}‘‘.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Došlo k problému s přístupem k úložišti implementace ‚‚{0}‘‘.
Zadáno v konfiguračním souboru ‚‚{1}‘‘.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Došlo k problému při stahování konfiguračního souboru.
Problém vyřešíte odstraněním souboru ‚‚{0}‘‘.</value>
Expand Down
6 changes: 1 addition & 5 deletions src/Store/Properties/Resources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,8 @@ Festgelegt in der Konfigurationsdatei '{1}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStore" xml:space="preserve">
<value>Auf den Implementierungsspeicher '{0}' konnte nicht zugegriffen werden.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Auf den Implementierungsspeicher '{0}' konnte nicht zugegriffen werden.
Mehr Informationen finden Sie in der Konfigurationsdatei '{1}'.</value>
Führen Sie '{1}' aus, um ihn aus der Liste der registrierten Verzeichnisse zu entfernen.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.el.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@
<value>Υπήρξε έναν πρόβλημα κατά την πρόσβαση στο κατάστημα εφαρμογής '{0}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Υπήρξε ένα πρόβλημα κατά την πρόσβαση στο κατάστημα εφαρμογής '{0}'.
Καθορίζεται στο αρχείο ρυθμίσεων '{1}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Υπήρξε ένα πρόβλημα κατά τη φόρτωση ενός αρχείου διαμόρφωσης.
Μπορείτε να διαγράψετε το αρχείο '{0}' για να διορθώσετε το πρόβλημα.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Se especifica en el archivo de configuración '{1}'.</value>
<value>No ha sido posible acceder a la memoria de implementación «{0}».</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>No ha sido posible acceder a la memoria de implementación «{0}».
Especificado en el archivo de configuración «{1}».</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Ha habido un problema al cargar el archivo de configuración.
Para resolver el problema, elimina el archivo «{0}».</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Spécifié dans le fichier de configuration '{1}'.</value>
<value>Problème d'accès à la bibliothèque d'implémentation '{0}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Problème d'accès à la bibliothèque d'implémentation '{0}'.
Spécifié dans le fichier de configuration '{1}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Problème lors du chargement d'un fichier de configuration.
Vous pouvez supprimer le fichier '{0}' pour résoudre le problème.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.id.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Ditentukan dalam file konfigurasi '{1}'.</value>
<value>Ada masalah dalam mengakses implementation store '{0}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Ada masalah dalam mengakses implementation store '{0}'.
Ditentukan dalam berkas konfigurasi '{1}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Ada masalah saat memuat berkas konfigurasi.
Anda dapat menghapus berkas '{0}' untuk memperbaiki masalah.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Specificato nel file di configurazione '{1}'.</value>
<value>Si è verificato un problema di accesso all'archivio delle implementazioni '{0}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Si è verificato un problema di accesso all'archivio delle implementazioni '{0}'.
Specificato nel file di configurazione '{1}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Si è verificato un problema durante il caricamento di un file di configurazione.
Puoi eliminare il file '{0}' per risolvere il problema.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ FAT形式のドライブを使用している場合は、NTFSに変換してく
<value>実装されたストア「{0}」へのアクセスに問題が発生しました。</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>実装されたストア「{0}」へのアクセスに問題が発生しました。
構成ファイル「{1}」で指定されています。</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>構成ファイルの読み込み時に問題が発生しました。
ファイル「{0}」を削除すると問題を解決できます。</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.ko.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ FAT 형식의 드라이브를 사용 중인 경우 NTFS로 변환하세요.</val
<value>구현 스토어 '{0}'에 액세스하는 데 문제가 발생했습니다.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>구현 스토어 '{0}'에 액세스하는 데 문제가 발생했습니다.
구성 파일 '{1}'에 지정되어 있음.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>구성 파일 로드 중에 문제가 발생했습니다.
'{0}' 파일을 삭제하여 문제를 해결할 수 있습니다.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.nl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Opgegeven in het configuratiebestand '{1}'.</value>
<value>Er is een probleem opgetreden bij de toegang tot de implementation store "{0}".</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Er is een probleem opgetreden bij de toegang tot de implementation store "{0}".
Gespecificeerd in het configuratiebestand "{1}".</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Er is een probleem opgetreden bij het laden van een configuratiebestand.
U kunt het bestand "{0}" verwijderen om het probleem op te lossen.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.pl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Określona w pliku konfiguracyjnym '{1}'.</value>
<value>Wystąpił problem z dostępem do magazynu implementacji „{0}”.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Wystąpił problem z dostępem do magazynu implementacji „{0}”.
Więcej informacji znajduje się w pliku konfiguracyjnym „{1}”.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Wystąpił problem z załadowaniem pliku konfiguracyjnego.
Aby rozwiązać ten problem, usuń plik „{0}”.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Especificado no arquivo de configuração '{1}'.</value>
<value>Ocorreu um problema ao acessar a memória de implementação "{0}".</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Ocorreu um problema ao acessar a memória de implementação "{0}".
Especificado no arquivo de configuração "{1}".</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Ocorreu um problema ao carregar um arquivo de configuração.
Você pode excluir o arquivo "{0}" para corrigir o problema.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.pt-PT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Especificado no ficheiro de configuração '{1}'.</value>
<value>Não foi possível aceder à memória de implementação "{0}".</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Não foi possível aceder à memória de implementação "{0}".
Especificada no ficheiro de configuração "{1}".</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Ocorreu um problema durante o carregamento de um ficheiro de configuração.
Para corrigir o problema, pode eliminar o ficheiro "{0}".</value>
Expand Down
5 changes: 1 addition & 4 deletions src/Store/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,8 @@ Specified in the configuration file '{1}'.</value>
<value>This option is controlled by a group policy and can therefore not be modified.</value>
</data>
<data name="ProblemAccessingStore" xml:space="preserve">
<value>There was a problem accessing the implementation store '{0}'.</value>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>There was a problem accessing the implementation store '{0}'.
Specified in the configuration file '{1}'.</value>
Run '{1}' to remove it from the list of registered directories.</value>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>There was a problem loading a configuration file.
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.ro.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ Specificată în fișierul de configurare '{1}'.</value>
<value>A existat o problemă la accesarea magazinului de implementare '{0}'.</value>
<comment>Automatically translated.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>A existat o problemă la accesarea magazinului de implementare '{0}'.
Specificat în fișierul de configurare '{1}'.</value>
<comment>Automatically translated.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>A existat o problemă la încărcarea unui fișier de configurare.
Puteți șterge fișierul '{0}' pentru a rezolva problema.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@
<value>Возникла проблема с доступом к хранилищу реализаций '{0}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>Возникла проблема с доступом к хранилищу реализаций '{0}',
указанному в файле конфигурации '{1}'.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Возникла проблема с загрузкой файла конфигурации.
Для устранения проблемы можно удалить файл '{0}'.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.tr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ FAT biçimindeki bir sürücü kullanıyorsanız lütfen bunu NTFS biçimine dö
<value>'{0}' uygulama deposuna erişilirken bir sorun çıktı.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>'{0}' uygulama deposuna erişilirken bir sorun çıktı.
'{1}' yapılandırma dosyasında belirtildi.</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>Yapılandırma dosyası yüklenirken bir sorun çıktı.
Sorunu çözmek için '{0}' dosyasını silebilirsiniz.</value>
Expand Down
5 changes: 0 additions & 5 deletions src/Store/Properties/Resources.zh.resx
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@
<value>访问执行存储'{0}'时遇到问题。</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemAccessingStoreEx" xml:space="preserve">
<value>访问执行存储'{0}'时遇到问题。
在配置文件'{1}'中指定。</value>
<comment>Manually overriden.</comment>
</data>
<data name="ProblemLoadingConfigFile" xml:space="preserve">
<value>加载配置文件时出现问题。
你可以删除文件'{0}'以解决该问题。</value>
Expand Down

0 comments on commit 5061ed0

Please sign in to comment.