Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are exceptions suppressed on purpose upon initialization? #25

Open
conradreuter opened this issue Jul 28, 2016 · 0 comments
Open

Are exceptions suppressed on purpose upon initialization? #25

conradreuter opened this issue Jul 28, 2016 · 0 comments

Comments

@conradreuter
Copy link

Consider the following initialization code I used for evaluating NEventStore:

Wireup
.Init()
.UsingSqlPersistence("Core NEventStore")
.WithDialect(new MsSqlDialect())
.UsingJsonSerialization()
.Build();

It all ran fine in a standalone console applicaiton. However, when I tried to use it in the initialization routines of an ASP.NET web application. The root cause of the error is, of course, missing CREATE TABLE permissions on the IIS user within my database.

It took me some good four hours to detect this, because the initialization method of the SqlPersistenceEngine actively suppresses exceptions. I used a custom ILog with breakpoints in each method to jump through all log messages. It seems that the following things happen:

  1. attempting to CREATE TABLE
  2. fails due to insufficient permissions, but the exception is suppressed
  3. transaction gets completed
  4. attempting to CREATE TABLE again
  5. fails due to transaction being already completed

In the end I was confronted with an exception that had really nothing much to do with the actual root cause of the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant