I'm trying to throw custom exception from a web service and trap it on the client side. I'm using JQuery and getting the JSON-serialized exceptions, so that's a good start. However the problems are:
- Stack trace is sent to the client which i don't want.
- I need to add an error code in addition to the exception message.
I've tried creating a custom exception, but it's omitting the error code when serializing.