// pretty print a fault statement to the console
        internal virtual void dumpFaultLine(FaultEvent e)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            // use a slightly different format for ConsoleErrorFaults
            if (e is ConsoleErrorFault)
            {
                sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingConsoleError"));                 //$NON-NLS-1$
                sb.Append(' ');
                sb.Append(e.information);
            }
            else
            {
                String name = e.name();
                sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingFault")); //$NON-NLS-1$
                sb.Append(' ');
                sb.Append(name);
                if (e.information != null && e.information.Length > 0)
                {
                    sb.Append(TextHelper.GetString("Info.InformationAboutFault")); //$NON-NLS-1$
                    sb.Append(e.information);
                }
            }
            TraceManager.AddAsync(sb.ToString(), 3);
        }
Пример #2
0
        // pretty print a fault statement to the console
        internal virtual void dumpFaultLine(FaultEvent e)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            // use a slightly different format for ConsoleErrorFaults
            if (e is ConsoleErrorFault)
            {
                sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingConsoleError"));                 //$NON-NLS-1$
                sb.Append(' ');
                sb.Append(e.information);
            }
            else
            {
                String name = e.name();
                sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingFault")); //$NON-NLS-1$
                sb.Append(' ');
                sb.Append(name);
                if ((string)e.information != null && e.information.length() > 0)
                {
                    sb.Append(TextHelper.GetString("Info.InformationAboutFault")); //$NON-NLS-1$
                    sb.Append(e.information);
                }
                if (PluginMain.settingObject.VerboseOutput)
                {
                    sb.AppendLine();
                    sb.Append(e.stackTrace());
                }
            }

            if (e.isolateId == 1)
            {
                TraceManager.AddAsync(sb.ToString(), 3);
            }
            else
            {
                TraceManager.AddAsync("Worker " + e.isolateId + ": " + sb.ToString(), 3);
            }
        }
        // pretty print a fault statement to the console
        internal virtual void dumpFaultLine(FaultEvent e)
        {
            StringBuilder sb = new StringBuilder();
            // use a slightly different format for ConsoleErrorFaults
            if (e is ConsoleErrorFault)
            {
                sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingConsoleError")); //$NON-NLS-1$
                sb.Append(' ');
                sb.Append(e.information);
            }
            else
            {
                String name = e.name();
                sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingFault")); //$NON-NLS-1$
                sb.Append(' ');
                sb.Append(name);
                if ((string)e.information != null && e.information.length() > 0)
                {
                    sb.Append(TextHelper.GetString("Info.InformationAboutFault")); //$NON-NLS-1$
                    sb.Append(e.information);
                }
                if (PluginMain.settingObject.VerboseOutput)
                {
                    sb.AppendLine();
                    sb.Append(e.stackTrace());
                }
            }

            if (e.isolateId == 1)
                TraceManager.AddAsync(sb.ToString(), 3);
            else
                TraceManager.AddAsync("Worker " + e.isolateId + ": " + sb.ToString(), 3);
        }
Пример #4
0
 // pretty print a fault statement to the console
 internal virtual void dumpFaultLine(FaultEvent e)
 {
     System.Text.StringBuilder sb = new System.Text.StringBuilder();
     // use a slightly different format for ConsoleErrorFaults
     if (e is ConsoleErrorFault)
     {
         sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingConsoleError")); //$NON-NLS-1$
         sb.Append(' ');
         sb.Append(e.information);
     }
     else
     {
         String name = e.name();
         sb.Append(TextHelper.GetString("Info.LinePrefixWhenDisplayingFault")); //$NON-NLS-1$
         sb.Append(' ');
         sb.Append(name);
         if ((string)e.information != null && e.information.length() > 0)
         {
             sb.Append(TextHelper.GetString("Info.InformationAboutFault")); //$NON-NLS-1$
             sb.Append(e.information);
         }
     }
     TraceManager.AddAsync(sb.ToString(), 3);
 }