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/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
}

lib/Service/JobService.php 1 location

@@ 331-341 (lines=11) @@
328
	 * @throws Exception
329
	 * @throws NotFoundException
330
	 */
331
	private function handleException($e) {
332
		$this->logger->logException ( $e, [ 
333
				'app' => 'ocr',
334
				'message' => 'Exception during job service function processing' 
335
		] );
336
		if ($e instanceof NotFoundException) {
337
			throw new NotFoundException ( $e->getMessage () );
338
		} else {
339
			throw $e;
340
		}
341
	}
342
}

lib/Service/QueueService.php 1 location

@@ 167-174 (lines=8) @@
164
	 * @throws Exception
165
	 * @throws NotFoundException
166
	 */
167
	private function handleException($e) {
168
		$this->logger->logException ( $e, [ 
169
				'app' => 'ocr',
170
				'message' => 'Exception during message queue processing' 
171
		] );
172
		if ($e instanceof NotFoundException) {
173
			throw new NotFoundException ( $e->getMessage () );
174
		} else {
175
			throw $e;
176
		}
177
	}