Replacing TrifleValueError with a Trifle exception.
Minor improvement to an assertion failure message.