Choco Smith
Choco Smith

Reputation: 1668

Nservicebus ignore internal exceptions

Is there anyway to stop during debugging NServiceBus from pausing on every internal exception thrown?

I do not want to disable break on all exceptions as I need to catch exception in my code.

I also don't want to configure to not break on System.Net.WebException and System.Exception as we use web technologies and like to know when they have propergated in our code.

I guess I don't really understand why this seems only to be the case for NServiceBus and no other nuget plugin I use. Is it because we use the NServiceBus.Host.exe program?

Simlar questions

NServiceBus throws The remote server returned an error: (404) Not Found

WebException error 404 after upgrading NServiceBus to version 3.3.8

How to disable RavenDB replication

Exception breaks during start of debug Currently starting a project break 12 times, some dissapear during the day.

  1. 'System.Net.WebException' The remote server returned an error: (404) Not Found. (RavenDb stack trace)
  2. The remote server returned an error: (404) Not Found. (Again)
  3. The remote server returned an error: (404) Not Found. (Again)
  4. The remote server returned an error: (404) Not Found. (Again)
  5. The remote server returned an error: (404) Not Found. (Again)
  6. The remote server returned an error: (404) Not Found. (Again)
  7. The remote server returned an error: (500) Internal Server (RavenDb stack trace)
  8. System.InvalidOperationException Url: "/docs/Raven/Authorization/WindowsSettings" (RavenDb stack trace)
  9. 'System.InvalidOperationException Url: "/docs/Raven/Authorization/WindowsSettings" (Again)
  10. 'System.InvalidOperationException Url: "/docs/Raven/Authorization/WindowsSettings" (Again)
  11. Exception has been thrown by the target of an invocation. (RavenUserInstaller)
  12. System.Exception: RavenDB requires a Commercial license to configure. (RavenUserInstaller)

Notes

Upvotes: 0

Views: 370

Answers (2)

John Simons
John Simons

Reputation: 4288

Unfortunately there is no way for NServiceBus to skip these exception.
These exceptions are thrown and handled by Raven internally.
The only way is for you to chance persistence to use NHibernate instead.

BTW, this question has been previously asked, see https://stackoverflow.com/a/5880940/90882

Upvotes: 0

David Boike
David Boike

Reputation: 18635

In Visual Studio, try Tools > Options > Debugging > General, then look for Enable Just My Code and make sure that is checked.

Failing that, check the settings in the Exceptions dialog (Debug > Exceptions or Ctrl+Alt+E) but note that this option only appears when you have a project loaded.

Upvotes: 3

Related Questions