Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fja
eval
Commits
96271653
Commit
96271653
authored
Apr 02, 2021
by
Vladimír Štill
Browse files
fja_checker: Put more details about exceptions into log
parent
c99829ee
Pipeline
#76008
passed with stage
in 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fja_checker/__main__.py
View file @
96271653
...
...
@@ -4,6 +4,7 @@ from lib.parsing.parser import Parser, ParsingError
from
lib.checker
import
get_task
,
dfa_transform
,
nfa_transform
,
check_task
,
check_empty
,
check_alphabets
,
exit_correct
,
exit_incorrect
import
sys
import
signal
import
traceback
def
print_extra_word_ce
(
student_word
):
...
...
@@ -20,6 +21,7 @@ def dfa_task(teacher_type, teacher_string, task, student_string):
teacher_solution
=
dfa_transform
(
teacher_string
,
teacher_type
)
except
ParsingError
as
ex
:
print
(
"Nastala chyba při parsování:"
,
ex
)
traceback
.
print_exc
(
file
=
sys
.
stderr
)
exit_incorrect
()
task_solved
=
""
...
...
@@ -156,6 +158,7 @@ def main():
except
Exception
as
ex
:
print
(
"Error inside of fja_checker:"
,
ex
.
args
)
traceback
.
print_exc
(
file
=
sys
.
stderr
)
exit
(
1
)
if
__name__
==
"__main__"
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment