Title | Poor error message if you fail to specify a required keyword argument |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | If 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. |
Analysis | Could 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 found | manual_test |
Evidence | [1] <http://www.ravenbrook.com/project/mps/...html#common-assertions-and-their-causes > |
Created by | Gareth Rees |
Created on | 2013-10-02 15:48:16 |
Last modified by | Gareth Rees |
Last modified on | 2014-10-14 22:05:34 |
History | 2013-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. |