Very simple Error handling with NServiceBus
Posted
by andy
on Stack Overflow
See other posts from Stack Overflow
or by andy
Published on 2010-04-29T23:30:14Z
Indexed on
2010/04/29
23:37 UTC
Read the original article
Hit count: 576
hey guys, here's a simple scenario
- NServiceBus Client/Server setup.
- The "Message" is a custom Class I wrote.
The Client sends a request message. The Server receives the message, and the server does this:
Bus.Reply(new UserDataResponseMessage { ID = Guid.NewGuid(), Response = users });
Then nothing. The Client never receives a response.
Exception:
By trawling through the log4net NServiceBus logs I find an exception, and it turns out that my customs class "users" is not marked as Serializable.
Ok, how does one got about "throwing" or "handling" that kind of error?
NServiceBus seems to promote the idea of not handling errors, but in this scenario its obvious to see some kind of "throw" would have saved a lot of time.
How do I handle such exceptions, where do they occur, where do they go?
© Stack Overflow or respective owner