MPS issue job003635

TitlePoor error message if you fail to specify a required keyword argument
Assigned userGareth Rees
DescriptionIf you fail to specify a required keyword argument, then the error you get is:

    arg.c:173: MPS ASSERTION FAILED: unreachable code

This is rubbish.
AnalysisCould at least put this in the section on "Common assertions and their causes" [1]. But it would be much better to say, "Keyword argument MPS_KEY_CHAIN is required when creating an AMS pool."

See also job003485.

The main difficulty with implementing this is that we must not rely on the Standard C Library, so assembling the error message is tricky.
How foundmanual_test
Evidence[1] <>
Created byGareth Rees
Created on2013-10-02 15:48:16
Last modified byGareth Rees
Last modified on2014-10-14 22:05:34
History2013-10-02 GDR Created.


Change Effect Date User Description
187267 closed 2014-10-14 22:05:30 Gareth Rees Improved assertion messages when a required keyword argument is not found. Instead of "unreachable code", the assertion message is the name of the missing key.