Skip to content

Commit 318d85a

Browse files
committed
Improved example and clarified migration and migratoin step usage
1 parent 359e30f commit 318d85a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

code_samples/data_migration/examples/try_catch_step.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
type: try_catch
33
mode: execute
44
allowed_exceptions:
5-
- Throwable
5+
- Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
66
stop_after_first_exception: true
77
steps:
88
-

docs/content_management/data_migration/importing_data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ If no matching queries are found, the migration throws an error.
161161

162162
You can wrap one or more migration steps with a `try_catch` step to handle exceptions gracefully.
163163

164-
Use it for migrations that may fail under specific conditions but should not halt the entire migration process.
164+
Use it for migration steps that may fail under specific conditions but should not halt the entire migration process.
165165

166-
For example, you can ensure a language creation migration succeeds even if the language already exists.
167-
If the migration fails for this reason, the exception is suppressed, allowing the remaining migrations to proceed without interruption.
166+
For example, you can ensure a language creation migration step succeeds even if the language already exists.
167+
If the migration step fails for this reason, the exception is suppressed, allowing the remaining migrations to proceed without interruption.
168168

169169
A `try_catch` migration requires the `steps` property and accepts optional `allowed_exceptions` and `stop_after_first_exception` settings.
170170

@@ -178,8 +178,8 @@ Default values are:
178178
```
179179

180180
When an exception is thrown within a `try_catch` step, it's compared against the list of `allowed_exceptions`.
181-
If the exception matches, it's caught and the migration continues or stops depending on the `stop_after_first_exception` configuration setting.
182-
The migration is marked as successful.
181+
If the exception matches, it's caught and the migration step continues or stops depending on the `stop_after_first_exception` configuration setting.
182+
The migration step is marked as successful and the migration process continues.
183183
Non-matching exceptions throw immediately, halting the migration process and returning an error.
184184

185185
### Expression syntax

0 commit comments

Comments
 (0)