diff options
Diffstat (limited to 'apps/workflowengine/lib/Manager.php')
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index 87c3c5de6b3..8c37e4d9885 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -21,7 +21,7 @@ namespace OCA\WorkflowEngine; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception; use OC\Cache\CappedMemoryCache; use OCA\WorkflowEngine\AppInfo\Application; use OCA\WorkflowEngine\Check\FileMimeType; @@ -290,7 +290,7 @@ class Manager implements IManager { * @param string $operation * @return array The added operation * @throws \UnexpectedValueException - * @throws DBALException + * @throw Exception */ public function addOperation( string $class, @@ -315,7 +315,7 @@ class Manager implements IManager { $this->addScope($id, $scope); $this->connection->commit(); - } catch (DBALException $e) { + } catch (Exception $e) { $this->connection->rollBack(); throw $e; } @@ -342,7 +342,7 @@ class Manager implements IManager { $result = $qb->execute(); $this->operationsByScope[$scopeContext->getHash()] = []; - while ($opId = $result->fetchColumn(0)) { + while ($opId = $result->fetchOne()) { $this->operationsByScope[$scopeContext->getHash()][] = (int)$opId; } $result->closeCursor(); @@ -358,7 +358,7 @@ class Manager implements IManager { * @return array The updated operation * @throws \UnexpectedValueException * @throws \DomainException - * @throws DBALException + * @throws Exception */ public function updateOperation( int $id, @@ -392,7 +392,7 @@ class Manager implements IManager { ->where($query->expr()->eq('id', $query->createNamedParameter($id))); $query->execute(); $this->connection->commit(); - } catch (DBALException $e) { + } catch (Exception $e) { $this->connection->rollBack(); throw $e; } @@ -405,7 +405,7 @@ class Manager implements IManager { * @param int $id * @return bool * @throws \UnexpectedValueException - * @throws DBALException + * @throws Exception * @throws \DomainException */ public function deleteOperation($id, ScopeContext $scopeContext) { @@ -425,7 +425,7 @@ class Manager implements IManager { ->execute(); } $this->connection->commit(); - } catch (DBALException $e) { + } catch (Exception $e) { $this->connection->rollBack(); throw $e; } |