raising an exception if the namespace isn't set