1

I'm defining a custom exception class to signal to my handler for a specific action to be taken. I'm wondering if I should make my exception Serializable or not. I don't intend to use the exception as anything more than an exit from my current execution.

(and yes, I do need a custom exception class. I'm pretty sure about that)

John Saunders
  • 160,644
  • 26
  • 247
  • 397
kosh
  • 551
  • 1
  • 9
  • 22
  • possible duplicate of [Why should I always make my Exceptions \[serializable\]? (.NET)](http://stackoverflow.com/questions/1066701/why-should-i-always-make-my-exceptions-serializable-net) – Tim Abell Oct 08 '14 at 15:58

1 Answers1

2

The best practice is to make them serializable. This way they can be serialized across AppDomain, or even process, boundaries.

John Saunders
  • 160,644
  • 26
  • 247
  • 397