Improve error messages in trans.gi, semitran.gi, semipperm.gi, reesmat.gi #1195
Closed
Description
opened on Mar 26, 2017
These files currently contain error messages like these:
ErrorNoReturn("IsomorphismTransformationMonoid: usage,\n",
"the argument must be a semigroup with a ",
"multiplicative neutral element,");
which leads to error messages like this one:
gap> IsomorphismTransformationMonoid(s);
Error, IsomorphismTransformationMonoid: usage,
the argument must be a semigroup with a multiplicative neutral element, at GAPROOT/lib/semitran.gi:360 called from
<function "unknown">( <arguments> )
called from read-eval loop at *stdin*:2
There are IMHO multiple things wrong with this:
- there is a trailing comma;
- there are newlines in the error message
- the fragment "usage," should be removed
- I'd also argue that the name of the function should be removed -- it should be printed as part of the generic backtrace. However, that seems to be broken in the example above.
Also note that in at least two error messages, there is no space after usage,
(namely in OnKernelAntiAction
and in NumberTransformation
). The latter also occurs in tests -- I wonder why nobody noticed this when generating the test?
Activity