/// <summary>
        /// 收到错误信息
        /// </summary>
        public void OnErrorMessage(ErrorMessageInfo info)
        {
            var assemblyName     = info.Runner.Assembly.GetName().Name;
            var webTesterManager = Application.Ioc.Resolve <WebTesterManager>();

            webTesterManager.UpdateInformation(assemblyName, testInfo => {
                testInfo.ErrorMessage += info.Message;
                testInfo.ErrorMessage += "\r\n";
                testInfo.Updated();
            });
        }
Example #2
0
 private static void OnErrorMessage(ErrorMessageInfo obj)
 {
     Console.WriteLine("Test failure: " + obj.ExceptionMessage);
 }
Example #3
0
 public void OnErrorMessage(ErrorMessageInfo info)
 {
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine($"error: {info.Message}");
     Console.ResetColor();
 }
Example #4
0
 private static void AppendVersionIncompatibilityMessage(StringBuilder sb, ErrorMessageInfo errMsgInfo)
 {
     sb.AppendFormat(LocalizationManager.GetString("DialogBoxes.OpenProjectDlg.ParatextProjectLoadError.VersionIncompatibility",
                                                   "Project {0} is not compatible with this version of {1}.", "Param 0: Paratext project name; Param 1: \"Glyssen\""),
                     errMsgInfo.ProjectName, GlyssenInfo.kProduct).Append(' ');
 }
Example #5
0
 private void ErrorMessageHandler(ErrorMessageInfo info)
 {
     logger.Info("### TEST ERROR ###");
     logger.Info(info.ExceptionMessage);
     logger.Info(info.ExceptionStackTrace);
 }
 private void OnTestError(ErrorMessageInfo obj)
 {
     LogOutput(obj.ExceptionMessage);
 }
Example #7
0
            // Various messages

            void OnErrorMessage(ErrorMessageInfo emi)
            {
                ConsoleEx.writeLine(ConsoleColor.Yellow, emi.ExceptionMessage);
            }
        /// <summary>
        /// Storeds the proc params.
        /// </summary>
        /// <param name="error">The error.</param>
        /// <param name="name">The name.</param>
        /// <returns>ErrorMessageInfo.</returns>
        private static ErrorMessageInfo StoredProcParams(Exception error, string name)
        {
            if (error.Message.Contains("Procedure"))
            {
                SqlCommand myCommand = new SqlCommand();
                myCommand.Connection = new SqlConnection(Config.GetConnectionString());
                myCommand.CommandText = Config.GetDataBaseOwner() + Config.GetObjectQualifer() + name;
                myCommand.CommandType = CommandType.StoredProcedure;

                myCommand.Connection.Open();
                SqlCommandBuilder.DeriveParameters(myCommand);
                myCommand.Connection.Close();

                ErrorMessageInfo errorMsg = new ErrorMessageInfo();

                errorMsg.Message = "Required Paramaters.";

                foreach(SqlParameter param in myCommand.Parameters)
                {
                    if(param.Direction == ParameterDirection.Input || param.Direction == ParameterDirection.InputOutput)
                    {
                        errorMsg.Paramaters.Add(new ParamaterInfo() {Name=param.ParameterName, DataType = param.SqlDbType.ToString()});
                    }
                }

                return errorMsg;
            }
            return new ErrorMessageInfo() {Message=HttpContext.Current.Server.HtmlEncode(error.ToString())};
        }
Example #9
0
 private static void Error(ErrorMessageInfo info)
 {
     Console.WriteLine("Error.");
 }