Throw state exception in a private function