private void SendErrorToOutput(string ewmessage, OutputWindow ow) //03Jul2013 error warning message
{
object o;
CommandRequest cmd = new CommandRequest();
string sinkfilefullpathname = Path.Combine(System.IO.Path.GetTempPath().Replace("\\", "/"), confService.GetConfigValueForKey("tempsink"));//23nov2012
// load default value if no path is set or invalid path is set
if (sinkfilefullpathname.Trim().Length == 0 || !IsValidFullPathFilename(sinkfilefullpathname, false))
{
MessageBox.Show(this, "Key 'tempsink' not found in config file. Aborting...");
return;
}
OpenSinkFile(@sinkfilefullpathname, "wt"); //06sep2012
SetSink(); //06sep2012
cmd.CommandSyntax = "write(\"" + ewmessage + ".\",fp)";// command
o = analytics.ExecuteR(cmd, false, false);
ResetSink();//06sep2012
CloseSinkFile();//06sep2012
CreateOuput(ow);//06sep2012
}