@@ -157,12 +157,13 @@ public function exists(): bool
157157 * @param string $content
158158 * @param bool $prefixIndex
159159 * @return Response
160- * @throws \Exception
160+ * @throws ElasticSearchException
161+ * @throws \Neos\Flow\Http\Exception
161162 */
162- public function request (string $ method , ? string $ path = null , array $ arguments = [], ? string $ content = null , bool $ prefixIndex = true ): Response
163+ public function request (string $ method , string $ path = null , array $ arguments = [], string $ content = null , bool $ prefixIndex = true ): Response
163164 {
164165 if ($ this ->client === null ) {
165- throw new \ Exception ('The client of the index " ' . $ this ->name . '" is not set, hence no requests can be done. ' , 1566313883 );
166+ throw new ElasticSearchException ('The client of the index " ' . $ this ->name . '" is not set, hence no requests can be done. ' , 1566313883 );
166167 }
167168 $ path = ($ path ? trim ($ path ) : '' );
168169 if ($ prefixIndex === true ) {
@@ -175,8 +176,8 @@ public function request(string $method, ?string $path = null, array $arguments =
175176 }
176177
177178 /**
178- * @return void
179- * @throws \Exception
179+ * @throws ElasticSearchException
180+ * @throws \Neos\Flow\Http\ Exception
180181 */
181182 public function create (): void
182183 {
@@ -199,8 +200,8 @@ protected function getSettings()
199200 }
200201
201202 /**
202- * @return void
203- * @throws \Exception
203+ * @throws ElasticSearchException
204+ * @throws \Neos\Flow\Http\ Exception
204205 */
205206 public function updateSettings ()
206207 {
@@ -217,6 +218,8 @@ public function updateSettings()
217218
218219 /**
219220 * @return void
221+ * @throws ElasticSearchException
222+ * @throws \Neos\Flow\Http\Exception
220223 */
221224 public function delete ()
222225 {
@@ -227,6 +230,8 @@ public function delete()
227230 * Refresh the index
228231 *
229232 * @return void
233+ * @throws ElasticSearchException
234+ * @throws \Neos\Flow\Http\Exception
230235 */
231236 public function refresh ()
232237 {
0 commit comments