Skip to content

Commit

Permalink
Docs: Update interface link (#18931)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arhell committed Oct 3, 2021
1 parent 7cca296 commit bb24645
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guide-fr/db-dao.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ try {
En appelant la méthode [[yii\db\Connection::beginTransaction()|beginTransaction()]], une nouvelle transaction est démarrée. La transaction est représentée sous forme d'objet [[yii\db\Transaction]] stocké dans la variable `$transaction`. Ensuite, les requêtes à exécuter sont placées dans un bloc `try...catch...`. Si toutes les requêtes réussissent, la méthode [[yii\db\Transaction::commit()|commit()]] est appelée pour entériner la transaction. Autrement, si une exception a été levée et capturée, la méthode [[yii\db\Transaction::rollBack()|rollBack()]] est appelée pour défaire les changements faits par les requêtes de la transaction antérieures à celle qui a échoué. `throw $e` est alors à nouveau exécutée comme si l'exception n'avait jamais été capturée, ce qui permet au processus normal de gestion des erreurs de s'en occuper.

> Note: dans le code précédent nous avons deux blocs « catch » pour compatibilité
> avec PHP 5.x et PHP 7.x. `\Exception` met en œuvre l'[interface `\Throwable`](https://secure.php.net/manual/en/class.throwable.php)
> avec PHP 5.x et PHP 7.x. `\Exception` met en œuvre l'[interface `\Throwable`](https://www.php.net/manual/en/class.throwable.php)
> depuis PHP 7.0, ainsi vous pouvez sauter la partie avec `\Exception` si votre application utilise seulement PHP 7.0 et plus récent.
### Spécification de niveaux d'isolation <span id="specifying-isolation-levels"></span>
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/db-dao.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ the changes made by the queries prior to that failed query in the transaction. `
exception as if we had not caught it, so the normal error handling process will take care of it.

> Note: in the above code we have two catch-blocks for compatibility
> with PHP 5.x and PHP 7.x. `\Exception` implements the [`\Throwable` interface](https://secure.php.net/manual/en/class.throwable.php)
> with PHP 5.x and PHP 7.x. `\Exception` implements the [`\Throwable` interface](https://www.php.net/manual/en/class.throwable.php)
> since PHP 7.0, so you can skip the part with `\Exception` if your app uses only PHP 7.0 and higher.

Expand Down

0 comments on commit bb24645

Please sign in to comment.