public ErrorDialog(RobotFaultEvent e) { this.Build(); titlelabel.Markup = "<big><b>Error in robot '" + Markup.EscapeText(e.robot.name) + "'</b></big>"; String message = e.exception.Message; if (e.exception.GetType() == typeof(RobotException)) { message = "(At instruction " + (e.exception as RobotException).ProgramLocation + ")\n" + message; } errorlabel.Markup = "The robot encountered a problem during execution, " + "and will now terminate.\n\n<b>Details:</b>\n" + message; }
/// <summary> /// Handles an error, current implementation simply displays the error message. /// </summary> /// <param name="e">The exception to handle</param> /// <returns>True if processing should continue, false otherwise</returns> private bool HandleError(RobotFaultEvent e) { Console.WriteLine(String.Format("Encountered an Error: {0}", e.exception.Message)); return(true); }
/// <summary> /// Handles an error, current implementation simply displays the error message. /// </summary> /// <param name="e">The exception to handle</param> /// <returns>True if processing should continue, false otherwise</returns> private bool HandleError(RobotFaultEvent e) { Console.WriteLine(String.Format("Encountered an Error: {0}", e.exception.Message)); return true; }