Exception Management

  • Thread starter Thread starter Ginny
  • Start date Start date
G

Ginny

The .NET architecture guide says that "Exceptions need to be serializble in
order to flow upstream accross tiers". Why? Cant we simply throw excpetions
to the calling code even if it is in a diffent component in a differnt layer
in a differnt machine on the newtork? I think it is basiccly passing
exceptions.
 
That's exactly what that sentence means. You CAN just pass an exception
between layers without having to serialize it. However, if you wanted to
pass an exception through a web service, you'd need to serialzie it.
 
I think that term that gave you trouble was "upstream". In this context,
upstream means via http.
 
The main reason is to allow serialization of exceptions across a web service
boundary. If you are not doing SOA, you can, technically speaking, drop this
requirement. Unless you have greatly altered the exception implementation,
it is not a lot of work to make it serializable (add an attribute).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
minor point: it also allows serialization of exceptions across appdomain and
remoting (process) boundaries.
 
Back
Top