I would like to have a custom message for the assert command, to replace this red with green code:
The green code is somewhat more readable and portable.
Clearly I want to separate the situations when, for example, x does not exist from situations when t<x+y.
The current error message "Assertion is false" may stay of course. I just want to be a bit more explicit (both for the coding and for the user that gets the message) on what is being checked and what went wrong.
This is common in other systems, see e.g. Microsoft's Visual Studio/C# reference.
Code:
capture assert t>=x+y if (_rc==9) { display "Invalid data on land use. Total must be at least as large as owned+rented." error 9 } else { if _rc assert t>=x+y } assert t>=x+y, message("Invalid data on land use. Total must be at least as large as owned+rented.")
Clearly I want to separate the situations when, for example, x does not exist from situations when t<x+y.
The current error message "Assertion is false" may stay of course. I just want to be a bit more explicit (both for the coding and for the user that gets the message) on what is being checked and what went wrong.
This is common in other systems, see e.g. Microsoft's Visual Studio/C# reference.
Comment