public static string ExceptionMessage(Exception exception) {
if (exception==null) {
return string.Empty;
}
if (exception.InnerException==null) {
return exception.Message;
}
return exception.Message + " (" + ExceptionMessage(exception.InnerException) + ")";
}