Skip to content

Fix error in exception handling code of gap interface #39906

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
11 changes: 10 additions & 1 deletion src/sage/interfaces/gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,15 @@ def _eval_line(self, line, allow_use_file=True, wait_for_prompt=True, restart_if
Restarting Gap and trying again
sage: a
3

Checks for :issue:`39906`::

sage: gap("a"*200)
Traceback (most recent call last):
...
TypeError: Gap terminated unexpectedly while reading in a large line:
Gap produced error output
Error, Variable: 'aaaa...aaaa' must have a value executing Read("...");
"""
expect_eof = self._quit_string() in line

Expand Down Expand Up @@ -728,7 +737,7 @@ def _eval_line(self, line, allow_use_file=True, wait_for_prompt=True, restart_if
else:
return ''
else:
raise RuntimeError(exc)
raise exc

except KeyboardInterrupt:
self._keyboard_interrupt()
Expand Down
Loading