refactor confusing finally block

This commit is contained in:
Art4 2024-11-22 11:02:54 +00:00
parent 4e9d129dd3
commit bc76f2af67

View file

@ -75,11 +75,12 @@ class PConfig
} }
} }
} catch (\Exception $exception) { } catch (\Exception $exception) {
throw new PConfigPersistenceException(sprintf('Cannot load config category "%s" for user %d', $cat, $uid), $exception);
} finally {
$this->db->close($configs); $this->db->close($configs);
throw new PConfigPersistenceException(sprintf('Cannot load config category "%s" for user %d', $cat, $uid), $exception);
} }
$this->db->close($configs);
return $return; return $return;
} }