private static void ProcessError(IRequestInfo info)
{
// pop-up the error messages if a debugger is attached or an environment variable is set
var popUpErrors = Debugger.IsAttached || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DEBUG_BLOOM"));
var post = info.GetPostDataWhenFormEncoded();
// log the error message
var errorMsg = post["message"] + Environment.NewLine + "File: " + post["url"].FromLocalhost()
+ Environment.NewLine + "Line: " + post["line"] + " Column: " + post["column"] + Environment.NewLine;
Logger.WriteMinorEvent(errorMsg);
Console.Out.WriteLine(errorMsg);
if (popUpErrors)
Shell.DisplayProblemToUser(errorMsg);
}