Skip to content

Commit

Permalink
Set base type for EventDeserializationFailureException as MartenExcep…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
oskardudycz committed Nov 29, 2022
1 parent 23712ed commit 954289f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/schema/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ services.AddMarten(opts =>
// database changes on application startup
.ApplyAllDatabaseChangesOnStartup();
```
<sup><a href='https://github.com/JasperFx/marten/blob/master/src/CoreTests/MartenServiceCollectionExtensionsTests.cs#L164-L177' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_using_applyalldatabasechangesonstartup' title='Start of snippet'>anchor</a></sup>
<sup><a href='https://github.com/JasperFx/marten/blob/master/src/CoreTests/MartenServiceCollectionExtensionsTests.cs#L163-L176' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_using_applyalldatabasechangesonstartup' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

In the option above, Marten is calling the same functionality within an `IHostedService` background task.
Expand Down
3 changes: 1 addition & 2 deletions src/CoreTests/MartenServiceCollectionExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public void picks_up_application_assembly_and_content_directory_from_IHostEnviro
[Fact]
public void application_assembly_and_content_directory_from_StoreOptions()
{

using var host = Host.CreateDefaultBuilder(Array.Empty<string>())
.ConfigureServices(services =>
{
Expand Down Expand Up @@ -340,4 +339,4 @@ private static void ShouldHaveAllTheExpectedRegistrations(Container container, S
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Marten.Exceptions
/// Thrown if Marten encounters an exception while trying to deserialize
/// or upcast a persisted event
/// </summary>
public class EventDeserializationFailureException : Exception
public class EventDeserializationFailureException : MartenException
{
public EventDeserializationFailureException(long sequence, Exception innerException) : base("Event deserialization error on sequence = " + sequence, innerException)
{
Expand Down

0 comments on commit 954289f

Please sign in to comment.