throwing a proper error