Opened 6 years ago

Closed 6 years ago

#17784 closed enhancement (fixed)

Modernize NTL error handler

Reported by: jdemeyer Owned by:
Priority: minor Milestone: sage-6.5
Component: c_lib Keywords:
Cc: pbruin, defeo Merged in:
Authors: Jeroen Demeyer Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 7f5bb61 (Commits) Commit: 7f5bb6171a8a386a8114e58de513751200db342e
Dependencies: Stopgaps:

Description

Move the NTL error handler out of c_lib to a Cython module. Also create a new exception class NTLError (inheriting from RuntimeError to not break backwards compatibility). All this is completely analogous to the PARI error handler.

Change History (10)

comment:1 Changed 6 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/17784
  • Created changed from 02/15/15 13:24:35 to 02/15/15 13:24:35
  • Modified changed from 02/15/15 13:24:35 to 02/15/15 13:24:35

comment:2 Changed 6 years ago by jdemeyer

  • Cc pbruin added
  • Commit set to 564f839be009189b12e6f6fbb65b91c48b099daf
  • Status changed from new to needs_review

New commits:

564f839Move NTL error handler to Cython

comment:3 Changed 6 years ago by defeo

  • Cc defeo added

comment:4 Changed 6 years ago by git

  • Commit changed from 564f839be009189b12e6f6fbb65b91c48b099daf to e11e0e82337b40f4dad8d59c51da85155104d397

Branch pushed to git repo; I updated commit sha1. New commits:

e11e0e8Rename ntl/handle_error.pyx to ntl/error.pyx

comment:5 Changed 6 years ago by git

  • Commit changed from e11e0e82337b40f4dad8d59c51da85155104d397 to 4546327c1cef223d398ece8f6f3f532904b24409

Branch pushed to git repo; I updated commit sha1. New commits:

4546327Add doctest to make coverage script happy

comment:6 follow-up: Changed 6 years ago by tscrim

Given the new .pxd file, do we still need the setup_NTL_error_callback as defined in c_lib/src/ntl_wrap.cpp and c_lib/include/ntl_wrap.h?

Also you're missing a colon in EXAMPLES: in setup_NTL_error_callback().

Last edited 6 years ago by tscrim (previous) (diff)

comment:7 in reply to: ↑ 6 Changed 6 years ago by jdemeyer

Replying to tscrim:

Given the new .pxd file, do we still need the setup_NTL_error_callback as defined in c_lib/src/ntl_wrap.cpp and c_lib/include/ntl_wrap.h?

No, we no longer need that function. But removing ntl_wrap will be a different ticket.

comment:8 Changed 6 years ago by git

  • Commit changed from 4546327c1cef223d398ece8f6f3f532904b24409 to 7f5bb6171a8a386a8114e58de513751200db342e

Branch pushed to git repo; I updated commit sha1. New commits:

7f5bb61Fix docstring formatting

comment:9 Changed 6 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Alright, positive review then.

comment:10 Changed 6 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/17784 to 7f5bb6171a8a386a8114e58de513751200db342e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.