#20899: `AbstractLinearCode` should throw sensible error messages on printing
-------------------------------------+-------------------------------------
Reporter: jsrn | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-7.3
Component: coding theory | Resolution:
Keywords: linear code, | Merged in:
error messages |
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/dlucas/abstract_lin_code_print_error_messages|
152c4711a4ca9c79878129cb0b5881e1c315d4cb
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by dlucas):
* status: new => needs_review
* commit: => 152c4711a4ca9c79878129cb0b5881e1c315d4cb
Comment:
Hello,
I pushed a fix for this ticket.
Two remarks:
- I used `RuntimeError` instead of `NotImplementedError` because using
`NotImplementedError` prints a poorly formatted error message (you don't
get any traceback).
- Because `_repr_` to always returns a string, it returns a string message
including the hexadecimal address of the objects which raised the error
after the usual error traceback... Because this address changes everytime,
I had to set a flag `#random` to the related doctest.
Best,
David
----
New commits:
||[https://git.sagemath.org/sage.git/commit?id=4862c831dc9b063f3902f7e1170a24f76ff71608
4862c83]||{{{Moved _latex_ method from AbstractLinearCode to
LinearCode}}}||
||[https://git.sagemath.org/sage.git/commit?id=152c4711a4ca9c79878129cb0b5881e1c315d4cb
152c471]||{{{Added generic _repr_ and _latex_ which raise informative
error messages}}}||
--
Ticket URL: <https://trac.sagemath.org/ticket/20899#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.