diff --git a/errors/custom.py b/errors/custom.py index 0d95315..5837fb3 100644 --- a/errors/custom.py +++ b/errors/custom.py @@ -1,4 +1,4 @@ -class InterpreterError(Exception): +class InterpreterException(Exception): pass class JavaSyntaxError(Exception): diff --git a/interpreter/NassiShneidermann.py b/interpreter/NassiShneidermann.py index da11556..03e3c7e 100644 --- a/interpreter/NassiShneidermann.py +++ b/interpreter/NassiShneidermann.py @@ -29,7 +29,7 @@ class NassiShneidermanDiagram: h += inst.getblksize() return int(h) - def convert_to_image(self, filepath, filename: str, x_size: int=200): + def convert_to_image(self, filepath: str, filename: str, x_size: int=200): image_y_sz = self._get_image_height() logging.info(f"Saving NSD to {filename}.png...") with NSD_writer(filepath, filename, x_size, image_y_sz): diff --git a/interpreter/interpret_source.py b/interpreter/interpret_source.py index 65ba5bb..a415c5a 100644 --- a/interpreter/interpret_source.py +++ b/interpreter/interpret_source.py @@ -3,7 +3,7 @@ from os import remove import re from typing import Callable, List, Tuple -from errors.custom import InterpreterError, JavaSyntaxError, ScopeNotFoundException +from errors.custom import InterpreterException, JavaSyntaxError, ScopeNotFoundException from draw.Iinstruction import * COMMENT_REGEX = r"""^//|^#|^COMMENT|^--""" @@ -163,5 +163,5 @@ def load_instructions(filepath: str) -> List[Iinstruction]: src = load_src(filepath) instructions, i = get_instructions_in_scope(src) if i != len(src): - raise InterpreterError("Unknown error during source interpretation! Unsupported language constructs or ill-formed source?") + raise InterpreterException("Unknown error during source interpretation! Unsupported language constructs or ill-formed source?") return instructions \ No newline at end of file