Skip to content

Commit

Permalink
feat: Add ParseException
Browse files Browse the repository at this point in the history
  • Loading branch information
murilobsd committed May 31, 2023
1 parent fc7ca07 commit 966a30c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyserasa/parserStringDados.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import re
import requests

class ParseException(Exception):
pass

class ParserStringDados(object):

Expand Down Expand Up @@ -70,8 +72,9 @@ def montar_bloco(self, bloco, arquivo):
else:
arquivo.blocos.append(bloco_montado)
except Exception as e:
print("Error: ", e)
print('Invalid block', nome_classe)
# print("Error: ", e)
# print('Invalid block', nome_classe)
raise ParseException("invalid block %s" % nome_classe)
finally:
return arquivo

Expand Down

0 comments on commit 966a30c

Please sign in to comment.