using System;
using System.Text;
namespace Sockeye.Util
{
internal static class ExceptionUtil
{
///
/// Extract and return exception message
/// Handles innermost exceptions level by level
///
///
///
public static string ExtractAllExceptionMessages(Exception ex)
{
StringBuilder sb = new StringBuilder();
while (ex != null)
{
sb.AppendLine($"{ex.Source} -> {ex.Message}");
ex = ex.InnerException;
}
return sb.ToString();
}
}//eoc
}//eons