We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ErikEJ/SqlServer.Rules'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
ExceptionText.cs•637 B
using System;
using System.Text;
namespace SqlServer.Rules.Tests.Utils;
public static class ExceptionText
{
public static string GetText(Exception ex, bool stackTrace = false)
{
var sb = new StringBuilder();
var depth = 0;
while (ex != null)
{
if (depth > 0)
{
sb.Append("Inner Exception: ");
}
sb.AppendLine(ex.Message);
if (stackTrace)
{
sb.AppendLine(ex.StackTrace);
}
ex = ex.InnerException;
++depth;
}
return sb.ToString();
}
}