models: throw exception without NDEBUG