Skip to content

Improve error messages in trans.gi, semitran.gi, semipperm.gi, reesmat.gi #1195

Closed
@fingolfin

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues that can be understood and addressed by newcomers to GAP developmentkind: enhancementLabel for issues suggesting enhancements; and for pull requests implementing enhancements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions