pf2e icon indicating copy to clipboard operation
pf2e copied to clipboard

Rethrow migration exceptions with added information

Open In3luki opened this issue 11 months ago • 8 comments

image

In3luki avatar Mar 13 '24 11:03 In3luki

This is already caught at an outer scope

stwlam avatar Mar 14 '24 18:03 stwlam

The current error is something like this:

Error thrown while migrating Actor.L0pXT0ba2Ovsjir9: Cannot read properties of undefined (reading 'flags')

Which isn't very helpful to locate where the error actually occured.

In3luki avatar Mar 14 '24 18:03 In3luki

What additional details does the example screenshot have?

stwlam avatar Mar 14 '24 18:03 stwlam

The MigrationRunner method the error occured in, the Migration version to identify the actual migration that failed and the Migration method the error occured in.

In3luki avatar Mar 14 '24 18:03 In3luki

It's already obvious that a failed actor or item migration is from one of those two methods, and the screenshot doesn't show the migration number.

stwlam avatar Mar 14 '24 18:03 stwlam

Oh, my bad: I see the number!

stwlam avatar Mar 14 '24 18:03 stwlam

Lose everything but the version number, got it. 😄

In3luki avatar Mar 14 '24 18:03 In3luki

Error thrown while migrating Actor.sJE82Ad2HKyKAB4k: Migration 0.915: Cannot read properties of
undefined (reading 'value')

In3luki avatar Mar 14 '24 19:03 In3luki