using System;
void MethodWithException() {
try {
throw new Exception("test exception");
}
catch (Exception e) {
//implementation of any partial processing
//and send error to the calling code
Console.WriteLine(e.ToString());
throw;
}
}
try {
MethodWithException();
}
catch (Exception e) {
Console.WriteLine(e.Message);
}