I think a better way of doing that is to create a test that fails in exactly that condition.
You can then put documentation in that test, as that's what the developer will look at first. You also get the bonus that, if someone finds a way to fix the function that causes that, then you can go back to possibly nicer code.