From 7fdd9f5d11f1ff400fae7a8b5ab13396096f7a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20A=2E=20Galindo?= Date: Thu, 31 Aug 2023 04:09:02 +0200 Subject: [PATCH] fix: managing errors better --- setup.py | 2 +- uvlparser/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f7408c7..9dab907 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="uvlparser", - version="1.0.0", + version="1.1.0.dev0", description="This module provides a get_tree function to obtain an ANTLR parse-tree from a UVL-defined feature model", long_description=long_description, long_description_content_type="text/markdown", diff --git a/uvlparser/main.py b/uvlparser/main.py index 747844e..5a84817 100644 --- a/uvlparser/main.py +++ b/uvlparser/main.py @@ -10,8 +10,8 @@ def syntaxError(self, recognizer, offendingSymbol, line, column, msg, e): return else: # Otherwise, print the error (or handle it in another way) - print(f"Line {line}:{column} - {msg}") - raise ParsingException("The UVL has sintactic problems that prevents reading it") + print(f"The UVL has the following error that prevents reading it :Line {line}:{column} - {msg}") + raise ParsingException("") def get_tree(argv):