Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Add exception classes in Python toolbox #2217

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.de.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ PythonSize = "Array-Grösse"
PythonNumpySort = "Aufsteigende sortieren"
PythonStd = "Standardabweichung"
PythonNumpySum = "Summe der Elemente"
PythonExceptionBaseException = "Basisklasse für eingebaute Ausnahmen"
PythonExceptionGeneratorExit = "Generator geschlossen"
PythonExceptionKeyboardInterrupt = "Programm beendet"
PythonExceptionException = "Basisklasse für benutzerdefinierte Ausnahmen"
PythonExceptionArithmeticError = "Arithmetischer Fehler"
PythonExceptionOverflowError = "Überlauf bei der Berechnung"
PythonExceptionZeroDivisionError = "Division durch Null"
PythonExceptionAssertionError = "Assertion-Fehler"
PythonExceptionAttributeError = "Attribut-Fehler"
PythonExceptionImportError = "Fehler beim Importieren"
PythonExceptionModuleNotFoundError = "Modul nicht fundiert"
PythonExceptionLookupError = "Schlüssel oder Index nicht gefunden"
PythonExceptionIndexError = "Index außerhalb der Bindung"
PythonExceptionKeyError = "Schlüssel nicht gefunden"
PythonExceptionMemoryError = "Zuweisungsfehler"
PythonExceptionNameError = "Name nicht gefunden"
PythonExceptionUnboundLocalError = "Lokale Variable nicht definiert"
PythonExceptionNotImplementedError = "Nicht-implementierte Funktionalität"
PythonExceptionRecursionError = "Zu viel Rekursion"
PythonExceptionStopIteration = "Generator-Fehler"
PythonExceptionSyntaxError = "Fehler in der Syntax"
PythonExceptionIndentationError = "Falsche Einrückung"
PythonExceptionTabError = "Inkonsistente Einrückung"
PythonExceptionTypeError = "Ungeeigneter Typ"
PythonExceptionValueError = "Ungeeigneter Wert"
PythonExceptionUnicodeError = "Unicode-Fehler"
PythonExceptionUnicodeDecodeError = "Unicode-Decodierungsfehler"
PythonExceptionUnicodeEncodeError = "Unicode-Kodierungsfehler"
PythonExceptionUnicodeTranslateError = "Unicode-Übersetzungsfehler"
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.en.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ PythonSize = "Number of elements in the array"
PythonNumpySort = "Sorting in ascending order"
PythonStd = "Standard deviation"
PythonNumpySum = "Sum of the elements"
PythonExceptionBaseException = "Base class for built-in exceptions"
PythonExceptionGeneratorExit = "Closed generator"
PythonExceptionKeyboardInterrupt = "Program exited"
PythonExceptionException = "Base class for custom exceptions"
PythonExceptionArithmeticError = "Arithmetic error"
PythonExceptionOverflowError = "Overflow during calculation"
PythonExceptionZeroDivisionError = "Division by zero"
PythonExceptionAssertionError = "Assertion error"
PythonExceptionAttributeError = "Attribut error"
PythonExceptionImportError = "Error during import"
PythonExceptionModuleNotFoundError = "Module not fund"
PythonExceptionLookupError = "key or index not found"
PythonExceptionIndexError = "Index out of bound"
PythonExceptionKeyError = "key not found"
PythonExceptionMemoryError = "Allocation error"
PythonExceptionNameError = "Name not found"
PythonExceptionUnboundLocalError = "Local variable not defined"
PythonExceptionNotImplementedError = "Non-implemented functionality"
PythonExceptionRecursionError = "Too much recursion"
PythonExceptionStopIteration = "Generator error"
PythonExceptionSyntaxError = "Syntax error"
PythonExceptionIndentationError = "Wrong indentation"
PythonExceptionTabError = "Inconsistent indentation"
PythonExceptionTypeError = "Inappropriate type"
PythonExceptionValueError = "Inappropriate value"
PythonExceptionUnicodeError = "Unicode error"
PythonExceptionUnicodeDecodeError = "Unicode decode error"
PythonExceptionUnicodeEncodeError = "Unicode encode error"
PythonExceptionUnicodeTranslateError = "Unicode translate error"
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.es.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ PythonSize = "Number of elements in the array"
PythonNumpySort = "Sorting in ascending order"
PythonStd = "Standard deviation"
PythonNumpySum = "Sum of the elements"
PythonExceptionBaseException = "Clase base para excepciones incorporadas"
PythonExceptionGeneratorExit = "Generador cerrado"
PythonExceptionKeyboardInterrupt = "Programa cerrado"
PythonExceptionException = "Clase base para excepciones personalizadas"
PythonExceptionArithmeticError = "Error aritmético"
PythonExceptionOverflowError = "Desbordamiento durante el cálculo"
PythonExceptionZeroDivisionError = "División por cero"
PythonExceptionAssertionError = "Error de aserción"
PythonExceptionAttributeError = "Error de atributo"
PythonExceptionImportError = "Error durante la importación"
PythonExceptionModuleNotFoundError = "Módulo no fondo"
PythonExceptionLookupError = "Clave o índice no encontrado"
PythonExceptionIndexError = "Índice fuera de límite"
PythonExceptionKeyError = "clave no encontrada"
PythonExceptionMemoryError = "Error de asignación"
PythonExceptionNameError = "Nombre no encontrado"
PythonExceptionUnboundLocalError = "Variable local no definida"
PythonExceptionNotImplementedError = "Funcionalidad no implementada"
PythonExceptionRecursionError = "Demasiada recursividad"
PythonExceptionStopIteration = "Error del generador"
PythonExceptionSyntaxError = "Error de sintaxis"
PythonExceptionIndentationError = "Sangría incorrecta"
PythonExceptionTabError = "Sangría incoherente"
PythonExceptionTypeError = "Tipo inadecuado"
PythonExceptionValueError = "Valor inadecuado"
PythonExceptionUnicodeError = "Error Unicode"
PythonExceptionUnicodeDecodeError = "Error de decodificación Unicode"
PythonExceptionUnicodeEncodeError = "Error de codificación Unicode"
PythonExceptionUnicodeTranslateError = "Error de traducción Unicode"
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.fr.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ PythonSize = "Nombre d'éléments dans l'array"
PythonNumpySort = "Tri croissant"
PythonStd = "Ecart-type"
PythonNumpySum = "Somme des éléments"
PythonExceptionBaseException = "Exception parente par défaut"
PythonExceptionGeneratorExit = "Générateur fermé"
PythonExceptionKeyboardInterrupt = "Arrêt forcé du programme"
PythonExceptionException = "Exception parente des erreur personalisées"
PythonExceptionArithmeticError = "Erreur d'arithmétique"
PythonExceptionOverflowError = "Le résultat du calcul est trop long"
PythonExceptionZeroDivisionError = "Division par zéro"
PythonExceptionAssertionError = "Erreur d'assertion"
PythonExceptionAttributeError = "Erreur d'attribut"
PythonExceptionImportError = "Erreur lors de l'importation"
PythonExceptionModuleNotFoundError = "Module non trouvé"
PythonExceptionLookupError = "Clé ou indice invalide"
PythonExceptionIndexError = "Indice hors des bornes"
PythonExceptionKeyError = "Clé non trouvée"
PythonExceptionMemoryError = "Erreur d'allocation"
PythonExceptionNameError = "Nom non trouvé"
PythonExceptionUnboundLocalError = "Variable local non définie"
PythonExceptionNotImplementedError = "Fonctionnalité non implémentée"
PythonExceptionRecursionError = "Trop de récursion"
PythonExceptionStopIteration = "Erreur de générateur"
PythonExceptionSyntaxError = "Erreur de syntaxe"
PythonExceptionIndentationError = "Mauvaise indentation"
PythonExceptionTabError = "Indentation non consistante"
PythonExceptionTypeError = "Type inapproprié"
PythonExceptionValueError = "Valeur inappropriée"
PythonExceptionUnicodeError = "Erreur Unicode"
PythonExceptionUnicodeDecodeError = "Erreur de décodage Unicode"
PythonExceptionUnicodeEncodeError = "Erreur d'encodage Unicode"
PythonExceptionUnicodeTranslateError = "Erreur de conversion Unicode"
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.it.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ PythonSize = "Numero di elementi nell'array"
PythonNumpySort = "Ordinamento crescente"
PythonStd = "Deviazione standard"
PythonNumpySum = "Somma degli elementi"
PythonExceptionBaseException = "Classe base per le eccezioni integrate"
PythonExceptionGeneratorExit = "Generatore chiuso"
PythonExceptionKeyboardInterrupt = "Il programma è uscito"
PythonExceptionException = "Classe base per le eccezioni personalizzate"
PythonExceptionArithmeticError = "Errore aritmetico"
PythonExceptionOverflowError = "Overflow durante il calcolo"
PythonExceptionZeroDivisionError = "Divisione per zero"
PythonExceptionAssertionError = "Errore di asserzione"
PythonExceptionAttributeError = "Errore di attributo"
PythonExceptionImportError = "Errore durante l'importazione"
PythonExceptionModuleNotFoundError = "Modulo non fondo"
PythonExceptionLookupError = "chiave o indice non trovati"
PythonExceptionIndexError = "Indice fuori limite"
PythonExceptionKeyError = "chiave non trovata"
PythonExceptionMemoryError = "Errore di allocazione"
PythonExceptionNameError = "Nome non trovato"
PythonExceptionUnboundLocalError = "Variabile locale non definita"
PythonExceptionNotImplementedError = "Funzionalità non implementata"
PythonExceptionRecursionError = "Troppa ricorsione"
PythonExceptionStopIteration = "Errore del generatore"
PythonExceptionSyntaxError = "Errore di sintassi"
PythonExceptionIndentationError = "Indentazione errata"
PythonExceptionTabError = "Indentazione incoerente"
PythonExceptionTypeError = "Tipo inappropriato"
PythonExceptionValueError = "Valore inappropriato"
PythonExceptionUnicodeError = "Errore Unicode"
PythonExceptionUnicodeDecodeError = "Errore di decodifica Unicode"
PythonExceptionUnicodeEncodeError = "Errore di codifica Unicode"
PythonExceptionUnicodeTranslateError = "Errore di traduzione Unicode"
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.nl.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ PythonSize = "Aantal elementen in de array"
PythonNumpySort = "Sorteren in oplopende volgorde"
PythonStd = "Standaardafwijking"
PythonNumpySum = "Som van de elementen"
PythonExceptionBaseException = "Basisklasse voor ingebouwde uitzonderingen"
PythonExceptionGeneratorExit = "Gesloten generator"
PythonExceptionKeyboardInterrupt = "Programma beëindigd"
PythonExceptionException = "Basisklasse voor aangepaste uitzonderingen"
PythonExceptionArithmeticError = "Rekenfout"
PythonExceptionOverflowError = "Overflow tijdens berekening"
PythonExceptionZeroDivisionError = "Deling door nul"
PythonExceptionAssertionError = "Assertiefout"
PythonExceptionAttributeError = "Attribut fout"
PythonExceptionImportError = "Fout tijdens importeren"
PythonExceptionModuleNotFoundError = "Module niet fonds"
PythonExceptionLookupError = "sleutel of index niet gevonden"
PythonExceptionIndexError = "Index niet gebonden"
PythonExceptionKeyError = "sleutel niet gevonden"
PythonExceptionMemoryError = "Toewijzingsfout"
PythonExceptionNameError = "Naam niet gevonden"
PythonExceptionUnboundLocalError = "Lokale variabele niet gedefinieerd"
PythonExceptionNotImplementedError = "Niet-geïmplementeerde functionaliteit"
PythonExceptionRecursionError = "Te veel recursie"
PythonExceptionStopIteration = "Generator fout"
PythonExceptionSyntaxError = "Syntaxis fout"
PythonExceptionIndentationError = "Verkeerde inspringing"
PythonExceptionTabError = "Inconsistente inspringing"
PythonExceptionTypeError = "Ongepast type"
PythonExceptionValueError = "Ongepaste waarde"
PythonExceptionUnicodeError = "Unicode-fout"
PythonExceptionUnicodeDecodeError = "Unicode-decoderingsfout"
PythonExceptionUnicodeEncodeError = "Unicode-codeerfout"
PythonExceptionUnicodeTranslateError = "Unicode vertaalfout"
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.pt.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,32 @@ PythonSize = "Número de elementos no array"
PythonNumpySort = "Ordena por ordem crescente"
PythonStd = "Desvio-padrão"
PythonNumpySum = "Soma dos elementos"
PythonExceptionBaseException = "Classe base para excepções incorporadas"
PythonExceptionGeneratorExit = "Gerador fechado"
PythonExceptionKeyboardInterrupt = "Programa encerrado"
PythonExceptionException = "Classe base para excepções personalizadas"
PythonExceptionArithmeticError = "Erro aritmético"
PythonExceptionOverflowError = "Estouro durante o cálculo"
PythonExceptionZeroDivisionError = "Divisão por zero"
PythonExceptionAssertionError = "Erro de asserção"
PythonExceptionAttributeError = "Erro de atributo"
PythonExceptionImportError = "Erro durante a importação"
PythonExceptionModuleNotFoundError = "Módulo não encontrado"
PythonExceptionLookupError = "Chave ou índice não encontrado"
PythonExceptionIndexError = "Índice fora do limite"
PythonExceptionKeyError = "chave não encontrada"
PythonExceptionMemoryError = "Erro de afetação"
PythonExceptionNameError = "Nome não encontrado"
PythonExceptionUnboundLocalError = "Variável local não definida"
PythonExceptionNotImplementedError = "Funcionalidade não implementada"
PythonExceptionRecursionError = "Demasiada recursão"
PythonExceptionStopIteration = "Erro do gerador"
PythonExceptionSyntaxError = "Erro de sintaxe"
PythonExceptionIndentationError = "Indentação incorrecta"
PythonExceptionTabError = "Indentação inconsistente"
PythonExceptionTypeError = "Tipo inadequado"
PythonExceptionValueError = "Valor inadequado"
PythonExceptionUnicodeError = "Erro de Unicode"
PythonExceptionUnicodeDecodeError = "Erro de descodificação Unicode"
PythonExceptionUnicodeEncodeError = "Erro de codificação Unicode"
PythonExceptionUnicodeTranslateError = "Erro de tradução de Unicode"
29 changes: 29 additions & 0 deletions apps/code/i18n/catalog.universal.i18n
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,32 @@ PythonCommandReshapeWithoutArg = ".reshape((\x11,))"
PythonCommandShapeWithoutArg = ".shape"
PythonCommandTolistWithoutArg = ".tolist()"
PythonCommandTransposeWithoutArg = ".transpose()"
PythonCommandBaseException = "BaseException"
PythonCommandGeneratorExit = "GeneratorExit"
PythonCommandKeyboardInterrupt = "KeyboardInterrupt"
PythonCommandException = "Exception"
PythonCommandArithmeticError = "ArithmeticError"
PythonCommandOverflowError = "OverflowError"
PythonCommandZeroDivisionError = "ZeroDivisionError"
PythonCommandAssertionError = "AssertionError"
PythonCommandAttributeError = "AttributeError"
PythonCommandImportError = "ImportError"
PythonCommandModuleNotFoundError = "ModuleNotFoundError"
PythonCommandLookupError = "LookupError"
PythonCommandIndexError = "IndexError"
PythonCommandKeyError = "KeyError"
PythonCommandMemoryError = "MemoryError"
PythonCommandNameError = "NameError"
PythonCommandUnboundLocalError = "UnboundLocalError"
PythonCommandNotImplementedError = "NotImplementedError"
PythonCommandRecursionError = "RecursionError"
PythonCommandStopIteration = "StopIteration"
PythonCommandSyntaxError = "SyntaxError"
PythonCommandIndentationError = "IndentationError"
PythonCommandTabError = "TabError"
PythonCommandTypeError = "TypeError"
PythonCommandValueError = "ValueError"
PythonCommandUnicodeError = "UnicodeError"
PythonCommandUnicodeDecodeError = "UnicodeDecodeError"
PythonCommandUnicodeEncodeError = "UnicodeEncodeError"
PythonCommandUnicodeTranslateError = "UnicodeTranslateError"
60 changes: 60 additions & 0 deletions apps/code/python_toolbox_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,66 @@ constexpr ToolboxMessageTree catalogChildren[] = {
I18n::Message::PythonCommandRealWithoutArg),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandZeros,
I18n::Message::PythonZeros),

ToolboxMessageTree::Leaf(I18n::Message::PythonCommandArithmeticError,
I18n::Message::PythonExceptionArithmeticError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAssertionError,
I18n::Message::PythonExceptionAssertionError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAttributeError,
I18n::Message::PythonExceptionAttributeError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandBaseException,
I18n::Message::PythonExceptionBaseException),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandException,
I18n::Message::PythonExceptionException),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandGeneratorExit,
I18n::Message::PythonExceptionGeneratorExit),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportError,
I18n::Message::PythonExceptionImportError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIndentationError,
I18n::Message::PythonExceptionIndentationError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIndexError,
I18n::Message::PythonExceptionIndexError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyError,
I18n::Message::PythonExceptionKeyError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyboardInterrupt,
I18n::Message::PythonExceptionKeyboardInterrupt),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLookupError,
I18n::Message::PythonExceptionLookupError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandMemoryError,
I18n::Message::PythonExceptionMemoryError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandModuleNotFoundError,
I18n::Message::PythonExceptionModuleNotFoundError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNameError,
I18n::Message::PythonExceptionNameError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNotImplementedError,
I18n::Message::PythonExceptionNotImplementedError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandOverflowError,
I18n::Message::PythonExceptionOverflowError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRecursionError,
I18n::Message::PythonExceptionRecursionError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandStopIteration,
I18n::Message::PythonExceptionStopIteration),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSyntaxError,
I18n::Message::PythonExceptionSyntaxError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandTabError,
I18n::Message::PythonExceptionTabError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandTypeError,
I18n::Message::PythonExceptionTypeError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUnboundLocalError,
I18n::Message::PythonExceptionUnboundLocalError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUnicodeDecodeError,
I18n::Message::PythonExceptionUnicodeDecodeError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUnicodeEncodeError,
I18n::Message::PythonExceptionUnicodeEncodeError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUnicodeError,
I18n::Message::PythonExceptionUnicodeError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUnicodeTranslateError,
I18n::Message::PythonExceptionUnicodeTranslateError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandValueError,
I18n::Message::PythonExceptionValueError),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandZeroDivisionError,
I18n::Message::PythonExceptionZeroDivisionError)

};

constexpr ToolboxMessageTree functionsChildren[] = {
Expand Down
Loading