From 798cd5b658cd16a85ada92ff8901bf53eef5fd94 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 7 Jan 2018 12:57:21 -0500 Subject: [PATCH] l10n removal of STRING_UNKNOWN_ERROR --- src/CLI2.cpp | 4 ++-- src/Context.cpp | 4 ++-- src/l10n/deu-DEU.h | 1 - src/l10n/eng-USA.h | 1 - src/l10n/epo-RUS.h | 1 - src/l10n/esp-ESP.h | 1 - src/l10n/fra-FRA.h | 1 - src/l10n/ita-ITA.h | 1 - src/l10n/jpn-JPN.h | 1 - src/l10n/pol-POL.h | 1 - src/l10n/por-PRT.h | 1 - src/main.cpp | 3 +-- 12 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 67b175660..ff7e5bca8 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -969,7 +969,7 @@ void CLI2::categorizeArgs () cmd->accepts_miscellaneous ()) { // Error: internally inconsistent. - throw std::string (STRING_UNKNOWN_ERROR); + throw std::string ("Unknown error. Please report."); } else if (cmd && cmd->accepts_filter () && @@ -1009,7 +1009,7 @@ void CLI2::categorizeArgs () cmd->accepts_miscellaneous ()) { // Error: internally inconsistent. - throw std::string (STRING_UNKNOWN_ERROR); + throw std::string ("Unknown error. Please report."); } } diff --git a/src/Context.cpp b/src/Context.cpp index eb4a2f824..24a70389d 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -595,7 +595,7 @@ int Context::initialize (int argc, const char** argv) catch (...) { - error (STRING_UNKNOWN_ERROR); + error ("Unknown error. Please report."); rc = 3; } @@ -708,7 +708,7 @@ int Context::run () catch (...) { - error (STRING_UNKNOWN_ERROR); + error ("Unknown error. Please report."); rc = 3; } diff --git a/src/l10n/deu-DEU.h b/src/l10n/deu-DEU.h index d68d51850..896b03ef3 100644 --- a/src/l10n/deu-DEU.h +++ b/src/l10n/deu-DEU.h @@ -699,7 +699,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Fehler: " -#define STRING_UNKNOWN_ERROR "Unbekannter Fehler." #define STRING_TRIVIAL_INPUT "Sie müssen einen Befehl oder eine Aufgabe zum ändern angeben." #define STRING_ASSUME_INFO "Kein Befehl angegeben - nehme 'information' an." #define STRING_INFINITE_LOOP "Beende Ersetzung, weil mehr als {1} Änderungen durchgeführt wurden - Schutz vor Endlosschleifen." diff --git a/src/l10n/eng-USA.h b/src/l10n/eng-USA.h index 6bf1385b3..49315b12c 100644 --- a/src/l10n/eng-USA.h +++ b/src/l10n/eng-USA.h @@ -697,7 +697,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Error: " -#define STRING_UNKNOWN_ERROR "Unknown error. Please report." #define STRING_TRIVIAL_INPUT "You must specify a command or a task to modify." #define STRING_ASSUME_INFO "No command specified - assuming 'information'." #define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection." diff --git a/src/l10n/epo-RUS.h b/src/l10n/epo-RUS.h index 35fa9c39c..5e16dccf8 100644 --- a/src/l10n/epo-RUS.h +++ b/src/l10n/epo-RUS.h @@ -699,7 +699,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Eraro: " -#define STRING_UNKNOWN_ERROR "Eraro nekonata." #define STRING_TRIVIAL_INPUT "Oni devas specifi komandon, aŭ taskon ke vi volas modifi." #define STRING_ASSUME_INFO "Nenia komando specifita. Supozanta 'information'." #define STRING_INFINITE_LOOP "Finis anstataŭon ĉar ekzistas pli de {1} ŝanĝoj - protekto kontraŭ senfina ripeton." diff --git a/src/l10n/esp-ESP.h b/src/l10n/esp-ESP.h index 9b5733624..a2adea6a8 100644 --- a/src/l10n/esp-ESP.h +++ b/src/l10n/esp-ESP.h @@ -711,7 +711,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Error: " // |esp-ESP|==|eng-USA| -#define STRING_UNKNOWN_ERROR "Error desconocido." #define STRING_TRIVIAL_INPUT "Debe especificar un comando o una tarea a modificar." #define STRING_ASSUME_INFO "No especificó un comando - asumido 'information'." #define STRING_INFINITE_LOOP "Sustitución terminada debido a que se hicieron más de {1} cambios - protección contra ciclo eterno." diff --git a/src/l10n/fra-FRA.h b/src/l10n/fra-FRA.h index 799cdbd60..3b5197b06 100644 --- a/src/l10n/fra-FRA.h +++ b/src/l10n/fra-FRA.h @@ -701,7 +701,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Erreur : " -#define STRING_UNKNOWN_ERROR "Erreur inconnue." #define STRING_TRIVIAL_INPUT "Il vous faut spécifier une commande ou une tâche à modifier." #define STRING_ASSUME_INFO "No command specified - assuming 'information'." #define STRING_INFINITE_LOOP "Substitution arrêté parce que plus de {1} changements ont été faits - protection contre les boucles infinies." diff --git a/src/l10n/ita-ITA.h b/src/l10n/ita-ITA.h index 0a0167e49..2e4c515e4 100644 --- a/src/l10n/ita-ITA.h +++ b/src/l10n/ita-ITA.h @@ -700,7 +700,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Errore: " -#define STRING_UNKNOWN_ERROR "Errore sconosciuto." #define STRING_TRIVIAL_INPUT "Specificare un comando o un task da modificare" #define STRING_ASSUME_INFO "Nessun comando specificato - si assume 'information'." #define STRING_INFINITE_LOOP "Sostituzione terminata poiché più di {1} modifiche sono state fatte - protezione da ciclo infinito" diff --git a/src/l10n/jpn-JPN.h b/src/l10n/jpn-JPN.h index 5621aff63..102f400e5 100644 --- a/src/l10n/jpn-JPN.h +++ b/src/l10n/jpn-JPN.h @@ -701,7 +701,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "エラー: " -#define STRING_UNKNOWN_ERROR "不明なエラー。" #define STRING_TRIVIAL_INPUT "変更したいコマンドまたはタスクを指定しなければなりません。" #define STRING_ASSUME_INFO "コマンドが指定されていません - 'information' を仮定します。" #define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection." diff --git a/src/l10n/pol-POL.h b/src/l10n/pol-POL.h index 380ceec98..cdc5e78cf 100644 --- a/src/l10n/pol-POL.h +++ b/src/l10n/pol-POL.h @@ -701,7 +701,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Błąd: " -#define STRING_UNKNOWN_ERROR "Nieznany błąd." #define STRING_TRIVIAL_INPUT "Musisz podać polecenie lub zadanie do zmiany." #define STRING_ASSUME_INFO "Nie podano polecenia - zakładam 'information'." #define STRING_INFINITE_LOOP "Podstawienie anulowane ponieważ wykonano więcej niż {1} zmian - zabezpieczenie przed zapętleniem." diff --git a/src/l10n/por-PRT.h b/src/l10n/por-PRT.h index b83fbb2e4..2175abf51 100644 --- a/src/l10n/por-PRT.h +++ b/src/l10n/por-PRT.h @@ -701,7 +701,6 @@ // Errors // TODO Move each of these to appropriate section. #define STRING_ERROR_PREFIX "Erro: " -#define STRING_UNKNOWN_ERROR "Erro desconhecido." #define STRING_TRIVIAL_INPUT "Deve específicar um comando ou a tarefa a modificar." #define STRING_ASSUME_INFO "Nenhum comando especificado - assumindo 'information'." #define STRING_INFINITE_LOOP "Substituição terminada. Efectuadas mais de {1} alterações - protecção de ciclos infinitos." diff --git a/src/main.cpp b/src/main.cpp index c0f3a0a2c..0c5133185 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include Context context; @@ -66,7 +65,7 @@ int main (int argc, const char** argv) catch (...) { - std::cerr << STRING_UNKNOWN_ERROR << "\n"; + std::cerr << "Unknown error. Please report.\n"; status = -2; } }