Code Duplication    Length = 8-11 lines in 4 locations

lib/Service/FileService.php 1 location

@@ 350-357 (lines=8) @@
347
	 * @throws Exception
348
	 * @throws NotFoundException
349
	 */
350
	private function handleException($e) {
351
		$this->logger->logException ( $e, [ 
352
				'app' => 'ocr',
353
				'message' => 'Exception during file service function processing' 
354
		] );
355
		if ($e instanceof NotFoundException) {
356
			throw new NotFoundException ( $e->getMessage () );
357
		} else {
358
			throw $e;
359
		}
360
	}

lib/Service/JobService.php 1 location

@@ 313-323 (lines=11) @@
310
	 * @throws Exception
311
	 * @throws NotFoundException
312
	 */
313
	private function handleException($e) {
314
		$this->logger->logException ( $e, [ 
315
				'app' => 'ocr',
316
				'message' => 'Exception during job service function processing' 
317
		] );
318
		if ($e instanceof NotFoundException) {
319
			throw new NotFoundException ( $e->getMessage () );
320
		} else {
321
			throw $e;
322
		}
323
	}
324
}

lib/Service/QueueService.php 1 location

@@ 153-160 (lines=8) @@
150
	 * @throws Exception
151
	 * @throws NotFoundException
152
	 */
153
	private function handleException($e) {
154
		$this->logger->logException($e, ['app' => 'ocr', 'message' => 'Exception during message queue processing']);
155
		if ($e instanceof NotFoundException) {
156
			throw new NotFoundException($e->getMessage());
157
		} else {
158
			throw $e;
159
		}
160
	}
161
162
}

lib/Service/StatusService.php 1 location

@@ 112-122 (lines=11) @@
109
	 * @throws Exception
110
	 * @throws NotFoundException
111
	 */
112
	private function handleException($e) {
113
		$this->logger->logException ( $e, [ 
114
				'app' => 'ocr',
115
				'message' => 'Exception during status service function processing' 
116
		] );
117
		if ($e instanceof NotFoundException) {
118
			throw new NotFoundException ( $e->getMessage () );
119
		} else {
120
			throw $e;
121
		}
122
	}
123
}