File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ type MigrationConfig =
146146 LogMigrationRan = fun _ -> ()
147147 }
148148
149+ type MigrationRuntimeException ( migrationName : string , inner : Exception ) =
150+ inherit Exception( " Error running migration " + migrationName + " : " + inner.Message, inner)
151+
149152module MigrationUtilities =
150153 let private quotationizeMigration ( migration : string Migration ) =
151154 <@@ { MajorVersion = %% Expr.Value( migration.MajorVersion)
@@ -187,7 +190,10 @@ module MigrationUtilities =
187190 migration.MajorVersion migration.Name
188191 currentMajorVersion
189192 else
190- backend.RunMigration( migration)
193+ try
194+ backend.RunMigration( migration)
195+ with
196+ | exn -> raise ( MigrationRuntimeException( migration.MigrationName, exn))
191197 config.LogMigrationRan migration
192198 ignore <| already.Add( pair) // actually we don't need this but ok
193199
You can’t perform that action at this time.
0 commit comments