Skip to content
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

Use GAP library functions to handle errors (DONT MERGE) #56

Closed
wants to merge 1 commit into from

Conversation

ssiccha
Copy link
Contributor

@ssiccha ssiccha commented Jun 7, 2018

Now that the GAP error functions can redirect their output to a
chosen stream, the previously used hack is no longer needed.

Also defines the variable IsRunningJupyterKernel when inside the
kernel loop. This variable is used by the library to know when
to print the traceback although BreakOnError = false.

See new commit message below.

Fixes #38.

@ssiccha
Copy link
Contributor Author

ssiccha commented Jun 7, 2018

This needs gap-system/gap#2530 to be merged.

@ssiccha ssiccha force-pushed the ss/use-library-errors branch from ebd0c6e to 3a1cd13 Compare June 7, 2018 21:55
@codecov
Copy link

codecov bot commented Jun 7, 2018

Codecov Report

Merging #56 into master will increase coverage by 3.58%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage    60.7%   64.29%   +3.58%     
==========================================
  Files           9        8       -1     
  Lines         817      689     -128     
==========================================
- Hits          496      443      -53     
+ Misses        321      246      -75
Impacted Files Coverage Δ
gap/JupyterKernel.gi 78.08% <100%> (+0.1%) ⬆️
gap/JupyterStream.gi 42.5% <0%> (-2.5%) ⬇️

@ssiccha ssiccha force-pushed the ss/use-library-errors branch from 3a1cd13 to 1dfe63e Compare June 13, 2018 10:14
@codecov-io
Copy link

codecov-io commented Jun 13, 2018

Codecov Report

Merging #56 into master will decrease coverage by 10.7%.
The diff coverage is 25%.

@@           Coverage Diff            @@
##           master   #56       +/-   ##
========================================
- Coverage    60.7%   50%   -10.71%     
========================================
  Files           9     9               
  Lines         817   694      -123     
========================================
- Hits          496   347      -149     
- Misses        321   347       +26
Impacted Files Coverage Δ
gap/JupyterError.gi 0% <0%> (-41.09%) ⬇️
gap/JupyterKernel.gi 75.34% <100%> (-2.64%) ⬇️
gap/JupyterHelp.gi 0% <0%> (-43.28%) ⬇️
gap/JupyterRenderable.gi 70% <0%> (-20%) ⬇️
gap/JupyterInspection.gi 69.11% <0%> (-16.18%) ⬇️
gap/JupyterUtil.gi 25% <0%> (-3.75%) ⬇️
gap/JupyterStream.gi 42.5% <0%> (-2.5%) ⬇️

Now that the GAP error functions can redirect their output to a
chosen stream, the previously used hack is no longer needed.

This commit provides a function JupyterOnBreak which prints a
traceback and then skips the break loop by calling JUMP_TO_CATCH.
When the jupyter kernel runs OnBreak is overwritten with
JupyterOnBreak.

To use this GAP is started without the -T option.

Fixes gap-packages#38.
@ssiccha ssiccha force-pushed the ss/use-library-errors branch from 1dfe63e to 36aeb0a Compare June 13, 2018 10:22
@ssiccha
Copy link
Contributor Author

ssiccha commented Jun 13, 2018

Now that the GAP error functions can redirect their output to a
chosen stream, the previously used hack is no longer needed.

This commit provides a function JupyterOnBreak which prints a
traceback and then skips the break loop by calling JUMP_TO_CATCH.
When the jupyter kernel runs OnBreak is overwritten with
JupyterOnBreak.

To use this GAP is started without the -T option.

@ssiccha
Copy link
Contributor Author

ssiccha commented Jun 13, 2018

This needs gap-system/gap#2529 and gap-system/gap#2530 to be merged in order to work.

@ssiccha ssiccha changed the title Use GAP library functions to handle errors Use GAP library functions to handle errors (DONT MERGE) Jun 13, 2018
@ssiccha ssiccha closed this Jul 6, 2018
@ssiccha
Copy link
Contributor Author

ssiccha commented Jul 6, 2018

This is replaced by #70.

@ssiccha ssiccha deleted the ss/use-library-errors branch July 6, 2018 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants