mikeobrien / WcfRestContrib

The WCF REST Contrib library adds additional functionality to the current WCF REST implementation.
MIT License
49 stars 18 forks source link

Allow non-"formatted" friendly message for WebException (mtc900) #6

Open mikeobrien opened 14 years ago

mikeobrien commented 14 years ago

There is a need to submit a raw friendly message that is not string.formattable. To do so, please add another constructor:

public WebException(HttpStatusCode status, string friendyMessage) : base(friendyMessage) { Status = status; }

Therefore, if there are no parameters, the string.format() method is never called and the friendly message can contain any combination of braces such as JavaScript code.