Why c# compiler is not smart enough in the following scenario?
void ThrowEx() {
throw new Exception();
}
int Test() {
ThrowEx();
}
...Test()': not all code paths return a value
Edit: in practice, i want to extract exception throwing logic into a separate method because i'm tired typing stuff like throw new FaultException<MyCustomFault>(new MyCustomFault(), "cannot validate the input");