protected static void ReThrowException(string msg, object[] paramList, Exception orig)
{
if (msg == null)
{
msg = "null message";
}
if ((paramList != null) && (paramList.Length > 0))
{
msg += " (" + ((paramList[0] == null) ? "null" : paramList[0].ToString());
for (int x = 1; x < paramList.Length; x++)
{
msg += ", " + ((paramList[x] == null) ? "null" : paramList[x].ToString());
}
msg += ")\n";
}
if (orig == null)
{
msg += "Exception was null.";
}
else
{
msg += "Exception Message: " + (orig.Message ?? "null") + "\n";
msg += "Exception StackTrace: " + (orig.StackTrace ?? "null");
}
throw new LoggingException(msg);
}