public static MessageFormatException CreateMessageFormatException(Exception cause)
{
string msg = cause.Message;
if (msg == null || msg.Length == 0)
{
msg = cause.ToString();
}
MessageFormatException exception = new MessageFormatException(msg, cause);
return exception;
}