Beispiel #1
0
 public Status(MessageHeader header, ErrorSeverity errorSeverity, ErrorCode errorCode, string description)
     : base(header, CommandType.Status)
 {
     Severity = errorSeverity;
     Code = errorCode;
     Description = description;
 }
Beispiel #2
0
 public AncestryException(ErrorSeverity severity, int errorCode, string message, Exception innerException)
     : base(message, innerException)
 {
     _code = errorCode;
     _severity = severity;
     HResult = OR_E_EXCEPTION;
 }
Beispiel #3
0
 public ValidationErrorBase(ITextRange range, string message, ErrorLocation location, ErrorSeverity severity) :
     base(range)
 {
     Message = message;
     Severity = severity;
     Location = location;
 }
Beispiel #4
0
 public AncestryException(int errorCode, string message)
     : base(message)
 {
     _code = errorCode;
     _severity = ErrorSeverity.Application;
     HResult = OR_E_EXCEPTION;
 }
 public ProgramError(string message, ErrorSeverity sev, int line, int col) 
     : base(message) 
 {
     Severity = sev;
     Line = line;
     Column = col;
     wasMessageGiven = !string.IsNullOrEmpty(message);
 }
 public void ShowPopup(Exception ex, ErrorSeverity severity)
 {
     var exceptionViewModel = CreateExceptionViewModel(ex, severity);
     if(exceptionViewModel != null)
     {
         exceptionViewModel.Show();
     }
 }
Beispiel #7
0
 public SyntaxException(ErrorSeverity severity, int code, string message, string details, string serverContext, int line, int linePos, TokenType tokenType, string token, AncestryException innerException)
     : base(severity, code, message, details, serverContext, innerException)
 {
     _line = line;
     _linePos = linePos;
     _tokenType = tokenType;
     _token = token;
 }
Beispiel #8
0
 public AutoCheckError(string FilePath, int LineNum, int StartIndex, int EndIndex, string Text, ErrorSeverity Severity)
 {
     this.FilePath = FilePath;
     this.LineNum = LineNum;
     this.StartIndex = StartIndex;
     this.EndIndex = EndIndex;
     this.Text = Text;
     this.Severity = Severity;
 }
Beispiel #9
0
 public ErrorListItem(ErrorSeverity errorSeverity, string description, int startLine, int startColumn, int endLine, int endColumn)
 {
     ErrorSeverity = errorSeverity;
     Description = description;
     StartLine = startLine;
     StartColumn = startColumn;
     EndLine = endLine;
     EndColumn = endColumn;
 }
Beispiel #10
0
 public static void GenerateSecurityExceptionResponse(this HttpActionContext actionContext, Type responsePayloadType, string exceptionCode, string exceptionDescription, ErrorCategory category = ErrorCategory.Security, ErrorSeverity severity = ErrorSeverity.Error)
 {
     GenerateExceptionResponse(actionContext, responsePayloadType, new ResponseMessage
     {
         Code = exceptionCode,
         Description = exceptionDescription,
         Category = category,
         Severity = severity
     });
 }
Beispiel #11
0
 protected static void AddSemanticError(ErrorHandler errs, string message, Position pos, ErrorSeverity severity)
 {
     if (pos != null)
     {
         errs.AddError(string.Format("Semantic error on line {0}: {1}", pos.StartLine, message),
             pos, severity);
     }
     else
     {
         errs.AddError(string.Format("Semantic error: {0}", message), null, severity);
     }
 }
Beispiel #12
0
        public void Notify (Exception e, ErrorSeverity severity = ErrorSeverity.Error, Metadata extraMetadata = null)
        {
            #if (!DEBUG)
            var extraData = new Dictionary<string, string> ();
            foreach (var item in extraMetadata) {
                if (item.Value != null) {
                    var data = item.Value.ToObject<Dictionary<string, string>>();
                    foreach (var i in data) {
                        extraData.Add ( item.Key + ":" + i.Key, i.Value);
                    }
                }
            }

            var tags = new List<string> { Enum.GetName (typeof (ErrorSeverity), severity) };
            RaygunClient.Current.SendInBackground (e, tags, extraData);
            #endif
        }
Beispiel #13
0
 public AncestryException(Exception exception)
     : base(exception.Message)
 {
     HResult = OR_E_EXCEPTION;
     AncestryException ancestryException = exception as AncestryException;
     _serverContext = exception.StackTrace;
     if (ancestryException != null)
     {
         _code = ancestryException.Code;
         _severity = ancestryException.Severity;
         _details = ancestryException.GetDetails();
     }
     else
     {
         _code = ApplicationError;
         _severity = ErrorSeverity.Application;
     }
 }
Beispiel #14
0
        public void Notify (Exception e, ErrorSeverity severity = ErrorSeverity.Error, Metadata extraMetadata = null)
        {
            var extraData = new Dictionary<string, string> ();
            foreach (var item in extraMetadata) {
                if (item.Value != null) {
                    var data = item.Value.ToObject<Dictionary<string, string>>();
                    foreach (var i in data) {
                        extraData.Add ( item.Key + ":" + i.Key, i.Value);
                    }
                }
            }

            if (severity == ErrorSeverity.Info) {
                Insights.Track ("Info", extraData);
            } else {
                var reportSeverity = severity == ErrorSeverity.Warning
                                     ? Insights.Severity.Warning : Insights.Severity.Error;

                Insights.Report (e, extraData, reportSeverity);
            }
        }
		public ErrorLogEntry Create(DateTime timeStamp, string message, string stackTrace, string data, ErrorSeverity severity)
		{
			var errorID = 0;
			_sqlObjectFactory.GetConnection().Using(connection => errorID = Convert.ToInt32(connection.Command("INSERT INTO pf_ErrorLog (TimeStamp, Message, StackTrace, Data, Severity) VALUES (@TimeStamp, @Message, @StackTrace, @Data, @Severity)")
				.AddParameter("@TimeStamp", timeStamp)
				.AddParameter("@Message", message)
				.AddParameter("@StackTrace", stackTrace)
				.AddParameter("@Data", data)
				.AddParameter("@Severity", severity)
				.ExecuteAndReturnIdentity()));
			var errorLog = new ErrorLogEntry
			               	{
			               		ErrorID = errorID,
			               		TimeStamp = timeStamp,
			               		Message = message,
			               		StackTrace = stackTrace,
			               		Data = data,
			               		Severity = severity
			               	};
			return errorLog;
		}
Beispiel #16
0
			/// <summary>
			/// Called when an error/warning should be reported.
			/// </summary>
			protected override bool Add(int id, string message, ErrorSeverity severity, int group, string fullPath, ErrorPosition pos)
			{
				if (id >= 0)
				{
					CompilerError error = new CompilerError();

					error.FileName = fullPath;
					error.Line = pos.FirstLine;
					error.Column = pos.FirstColumn;
					error.ErrorNumber = String.Format("PHP{0:d4}", id);
					error.ErrorText = message;
					error.IsWarning = (severity.Value == ErrorSeverity.Values.Warning);

					results.Errors.Add(error);
				}

				// build the output line
				StringBuilder sb = new StringBuilder(128);
				if (fullPath != null)
				{
					sb.AppendFormat("{0}({1},{2}): ",
						fullPath,
						pos.FirstLine,
						pos.FirstColumn);
				}

				if (id >= 0)
				{
					sb.AppendFormat("{0} PHP{1:d4}: {2}",
						severity.ToCmdString(),
						id,
						message);
				}
				else sb.Append(message);

				results.Output.Add(sb.ToString());

				return true;
			}
 public void SetStatus(ErrorSeverity severity, string description, string code)
 {
     this.Severity = severity;
     this.Description = description;
     this.Code = code;
 }
Beispiel #18
0
 /// <summary>
 /// </summary>
 /// <param name="message"></param>
 /// <param name="type"></param>
 /// <param name="severity"></param>
 public ErrorEventArgs(string message, ErrorType type, ErrorSeverity severity)
 {
     Message = message;
     Type = type;
     Severity = severity;
 }
 public void ClearStatus()
 {
     this.Severity = ErrorSeverity.None;
     this.Code = null;
     this.Description = null;
 }
 public DataSchemaError(string message, string document, int errorCode, ErrorSeverity severity)
     : this(message, document, 0, 0, DefaultPrefix, errorCode, severity)
 {
 }
Beispiel #21
0
 public static void GenerateSecurityExceptionResponse(this HttpActionContext actionContext, Type responsePayloadType, string id, string exceptionCode, string exceptionDescription, ErrorCategory category = ErrorCategory.Security, ErrorSeverity severity = ErrorSeverity.Error)
 {
     GenerateExceptionResponse(actionContext, responsePayloadType, new ResponseMessage
     {
         Id          = id,
         Code        = exceptionCode,
         Description = exceptionDescription,
         Category    = category,
         Severity    = severity
     });
 }
        /// <summary>
        /// Handle and log the exception into a file and datbase.
        /// </summary>
        /// <param name="ex">System.Exception</param>
        /// <param name="location">Location where exception has occurred, if not specified it will pick from CallerMemberName attribute</param>
        /// <param name="severity">CRITICAL, MAJOR, MODERATE, MINOR-Default, COSMETIC</param>
        /// <param name="code">You can specify a error code, if not this will be empty</param>
        /// <returns></returns>
        public static CIException HandleError(Exception ex, string parameters = "", [CallerMemberName] string location = "", ErrorSeverity severity = ErrorSeverity.MINOR, string code = "", [CallerFilePath] string filePath = "")
        {
            CIException CIEx = null;

            if (ex.GetType() == typeof(CIException))
            {
                CIEx = ex as CIException;
            }
            else
            {
                CIEx = new CIException(ex.Message, ex);
            }

            if (severity != ErrorSeverity.COSMETIC)
            {
                CIEx.Severity = severity;
            }

            CIEx.Location = filePath + "-" + location;

            if (!string.IsNullOrEmpty(parameters))
            {
                CIEx.Parameters = parameters;
            }

            CIEx.Code = "HttpStatusCode: " + ((int)CIEx.StatusCode).ToString();

            if (!string.IsNullOrEmpty(code))
            {
                CIEx.Code = " ErrorCode: " + code;
            }

            if (!CIEx.IsHandled)
            {
                ErrorLogDatabase(CIEx);
                ErrorLogText(CIEx);
                CIEx.IsHandled = true;
            }

            return(CIEx);
        }
Beispiel #23
0
 public SqlServerError(string message, string document, ErrorSeverity severity)
     : this(message, null, document, 0, 0, Constants.UndefinedErrorCode, severity)
 {
 }
Beispiel #24
0
 bool INativeInterop.ChangeServiceConfigW(ServiceHandle service, ServiceType serviceType, ServiceStartType startType, ErrorSeverity errorSeverity, string binaryPath, string loadOrderGroup, IntPtr outUIntTagId, string dependencies, string serviceUserName, string servicePassword, string displayName)
 {
     return(ChangeServiceConfigW(service, serviceType, startType, errorSeverity, binaryPath, loadOrderGroup, outUIntTagId, dependencies, serviceUserName, servicePassword, displayName));
 }
Beispiel #25
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, string AStatement, params object[] AParams) : base(FResourceManager, (int)AErrorCode, ASeverity, null, AParams)
 {
     FStatement = AStatement;
 }
 public ErrorDescriptor(ErrorSeverity severity, string message)
 {
     Severity = severity;
     Message  = message;
 }
Beispiel #27
0
 ServiceHandle INativeInterop.CreateServiceW(ServiceControlManager serviceControlManager, string serviceName, string displayName,
                                             ServiceControlAccessRights desiredControlAccess, ServiceType serviceType, ServiceStartType startType, ErrorSeverity errorSeverity,
                                             string binaryPath,
                                             string loadOrderGroup, IntPtr outUIntTagId, string dependencies, string serviceUserName, string servicePassword)
 {
     return(CreateServiceW(serviceControlManager, serviceName, displayName, desiredControlAccess, serviceType, startType, errorSeverity,
                           binaryPath, loadOrderGroup, outUIntTagId, dependencies, serviceUserName, servicePassword));
 }
Beispiel #28
0
        public void RunAsyncTest(bool unicode)
        {
#if _LOG_TO_FILE
            using (sw = new System.IO.StreamWriter("C:\\Logs\\RunAsyncTestLog.Txt", true))
            {
                LogFile.SetLoggingFunction(LogFn);
#endif
            string serverAddr = "localhost:6666";
            string user       = "******";
            string pass       = string.Empty;
            string ws_client  = "admin_space";

            // turn off exceptions for this test
            ErrorSeverity oldExceptionLevel = P4Exception.MinThrowLevel;
            P4Exception.MinThrowLevel = ErrorSeverity.E_NOEXC;

            Process p4d = null;

            try
            {
                p4d = Utilities.DeployP4TestServer(TestDir, unicode, TestContext.TestName);
                using (serverMT = new P4ServerMT(serverAddr, user, pass, ws_client))
                {
                    P4Server server = serverMT.getServer();
                    if (unicode)
                    {
                        Assert.IsTrue(server.UseUnicode, "Unicode server detected as not supporting Unicode");
                    }
                    else
                    {
                        Assert.IsFalse(server.UseUnicode, "Non Unicode server detected as supporting Unicode");
                    }

                    run = true;

                    Thread t1 = new Thread(new ThreadStart(cmdThreadProc1));
                    t1.Name = "RunAsyncTest Thread t1";
                    Thread t2 = new Thread(new ThreadStart(cmdThreadProc2));
                    t2.Name = "RunAsyncTest Thread t2";
                    Thread t3 = new Thread(new ThreadStart(cmdThreadProc3));
                    t3.Name = "RunAsyncTest Thread t3";

                    Thread t4 = new Thread(new ThreadStart(cmdThreadProc4));
                    t4.Name = "RunAsyncTest Thread t4";
                    Thread t5 = new Thread(new ThreadStart(cmdThreadProc5));
                    t5.Name = "RunAsyncTest Thread t5";
                    Thread t6 = new Thread(new ThreadStart(cmdThreadProc6));
                    t6.Name = "RunAsyncTest Thread t6";

                    t1.Start();
                    Thread.Sleep(TimeSpan.FromSeconds(5));                             // wait to start a 4th thread
                    t2.Start();
                    t3.Start();
                    Thread.Sleep(TimeSpan.FromSeconds(5));                             // wait to start a 4th thread

                    run = false;

                    if (t1.Join(1000) == false)
                    {
                        WriteLine("Thread 1 did not cleanly exit");
                        t1.Abort();
                    }
                    if (t2.Join(1000) == false)
                    {
                        WriteLine("Thread 2 did not cleanly exit");
                        t2.Abort();
                    }
                    if (t3.Join(1000) == false)
                    {
                        WriteLine("Thread 3 did not cleanly exit");
                        t3.Abort();
                    }

                    Thread.Sleep(TimeSpan.FromSeconds(15));                             // wait 15 seconds so will disconnect

                    run = true;;

                    t1      = new Thread(new ThreadStart(cmdThreadProc1));
                    t1.Name = "RunAsyncTest Thread t1b";
                    t2      = new Thread(new ThreadStart(cmdThreadProc2));
                    t2.Name = "RunAsyncTest Thread t2b";
                    t3      = new Thread(new ThreadStart(cmdThreadProc3));
                    t3.Name = "RunAsyncTest Thread t3b";

                    t1.Start();
                    t2.Start();
                    t3.Start();
                    Thread.Sleep(TimeSpan.FromSeconds(1));                             // wait to start a 4th thread

                    t4.Start();
                    Thread.Sleep(TimeSpan.FromSeconds(2));                             // wait to start a 5th thread
                    t5.Start();
                    Thread.Sleep(TimeSpan.FromSeconds(3));                             // wait to start a 6th thread
                    t6.Start();

                    Thread.Sleep(TimeSpan.FromSeconds(15));                             // run all threads for 15 seconds

                    run = false;

                    if (t1.Join(1000) == false)
                    {
                        WriteLine("Thread 1 did not cleanly exit");
                        t1.Abort();
                    }
                    if (t2.Join(1000) == false)
                    {
                        WriteLine("Thread 2 did not cleanly exit");
                        t2.Abort();
                    }
                    if (t3.Join(1000) == false)
                    {
                        WriteLine("Thread 3 did not cleanly exit");
                        t3.Abort();
                    }
                    if (t4.Join(1000) == false)
                    {
                        WriteLine("Thread 4 did not cleanly exit");
                        t4.Abort();
                    }
                    if (t5.Join(1000) == false)
                    {
                        WriteLine("Thread 5 did not cleanly exit");
                        t5.Abort();
                    }
                    if (t6.Join(1000) == false)
                    {
                        WriteLine("Thread 6 did not cleanly exit");
                        t6.Abort();
                    }
                }
            }
            catch (Exception ex)
            {
                Assert.Fail("Test threw an exception: {0}\r\n{1}", ex.Message, ex.StackTrace);
            }
            finally
            {
                Utilities.RemoveTestServer(p4d, TestDir);
            }

            // reset the exception level
            P4Exception.MinThrowLevel = oldExceptionLevel;
#if _LOG_TO_FILE
        }
#endif
        }
Beispiel #29
0
 /// <summary>
 /// Logs only the errors caught directly in user implementations, and with access the method that triggered the exception (extensibilityException.Method)
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="extensibilityExceptions">The exceptions holding the methods being executed as an object</param>
 /// <param name="errorSeverity">The error severity.</param>
 public void LogErrors(string message, List <ExtensibilityException> extensibilityExceptions, ErrorSeverity errorSeverity = ErrorSeverity.Normal)
 {
     LogErrors(message, extensibilityExceptions.Select(p => p.Exception).ToList(), errorSeverity);
 }
Beispiel #30
0
 /// <summary>
 /// Logs only the errors caught directly in user implementations, and with access the method that triggered the exception (extensibilityException.Method)
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="extensibilityException">The exception holding the method being executed as an object</param>
 /// <param name="errorSeverity">The error severity.</param>
 public void LogError(string message, ExtensibilityException extensibilityException, ErrorSeverity errorSeverity = ErrorSeverity.Normal)
 {
     LogError(message, extensibilityException.Exception, errorSeverity);
 }
Beispiel #31
0
 public abstract bool DetatchStream(LogStream stream, ErrorSeverity severity = ErrorSeverity.Debugging | ErrorSeverity.Err | ErrorSeverity.Warn | ErrorSeverity.Info);
 public DataSchemaError(string message, Exception innerException, ErrorSeverity severity)
     : this(message, innerException, string.Empty, 0, severity)
 {
 }
Beispiel #33
0
 public ScanException(Codes errorCode, ErrorSeverity severity, params object[] paramsValue) : base(_resourceManager, (int)errorCode, severity, null, paramsValue)
 {
 }
 public static void ReportError(ErrorSeverity severity, Exception e, string description, string className, string method, string line, int serviceId, string userName = "******")
 {
     LogError(severity, className, method, line, userName, serviceId, description, e);
 }
 private void ReportError(string errorMessage, ErrorType errorType, ErrorSeverity errorSeverity)
 {
     _errorStore.ReportError(errorMessage, errorType, errorSeverity);
 }
 public DataSchemaError(DataSchemaError source, ErrorSeverity severity)
     : this(source.Message, source.Document, source.Line, source.Column, source.Prefix, source.ErrorCode, severity)
 {
 }
Beispiel #37
0
 public ScanException(Codes errorCode, ErrorSeverity severity) : base(_resourceManager, (int)errorCode, severity, null, null)
 {
 }
Beispiel #38
0
 /// <summary>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="type"></param>
 /// <param name="severity"></param>
 /// <param name="message"></param>
 public void Error(object sender, ErrorType type, ErrorSeverity severity, String message)
 {
     Error(sender, new ErrorEventArgs(message, type, severity));
 }
Beispiel #39
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, Exception AInnerException, string AStatement) : base(FResourceManager, (int)AErrorCode, ASeverity, AInnerException, null)
 {
     FStatement = AStatement;
 }
 public void logerror(string message, string details, ErrorType errorType, ErrorSeverity errorSeverity)
 {
     //throw new NotImplementedException();
 }
 public DataSchemaError(string message, ErrorSeverity severity)
     : this(message, string.Empty, severity)
 {
 }
Beispiel #42
0
 protected ConnectionException(ResourceManager AResourceManager, int AErrorCode, ErrorSeverity ASeverity, Exception AInnerException, params object[] AParams) : base(AResourceManager, AErrorCode, ASeverity, AInnerException, AParams)
 {
 }
Beispiel #43
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, Exception AInnerException) : base(FResourceManager, (int)AErrorCode, ASeverity, AInnerException, null)
 {
 }
Beispiel #44
0
 // Constructors
 protected QPException(ResourceManager resourceManager, int errorCode, ErrorSeverity severity, Exception innerException, params object[] paramsValue)
     : base(resourceManager, errorCode, severity, innerException, paramsValue)
 {
 }
Beispiel #45
0
        public void Notify (Exception e, ErrorSeverity severity = ErrorSeverity.Error, Metadata extraMetadata = null)
        {
            if (!ShouldNotify)
                return;
            if (IgnoredExceptions != null && IgnoredExceptions.Contains (e.GetType ()))
                return;

            var md = new Metadata (metadata);
            if (extraMetadata != null) {
                md.Merge (extraMetadata);
            }

            var ev = new Event () {
                User = userInfo,
                App = GetAppInfo (),
                AppState = GetAppState (),
                System = GetSystemInfo (),
                SystemState = GetSystemState (),
                Context = Context,
                Severity = severity,
                Exceptions = ConvertExceptionTree (e),
                Metadata = md,
            };

            SendEvent (ev);
        }
        public void Notify(Exception e, ErrorSeverity severity = ErrorSeverity.Error, Metadata extraMetadata = null)
        {
            if (!ShouldNotify)
                return;
            if (IgnoredExceptions != null && IgnoredExceptions.Contains (e.GetType ()))
                return;

            var md = new Metadata (metadata);
            if (extraMetadata != null) {
                md.Merge (extraMetadata);
            }

            notifier.Notify (new Event () {
                User = GetUserInfo (),
                App = state.GetApplicationInfo (),
                AppState = state.GetApplicationState (),
                System = state.GetSystemInfo (),
                SystemState = state.GetSystemState (),
                Context = Context,
                Severity = severity,
                Exceptions = exceptionConverter.Convert (e),
                Metadata = md,
            });
        }
Beispiel #47
0
 /// <summary>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="type"></param>
 /// <param name="severity"></param>
 /// <param name="message"></param>
 /// <param name="parameters"></param>
 public void Error(object sender, ErrorType type, ErrorSeverity severity, String message, params object[] parameters)
 {
     Error(sender, type, severity, String.Format(message, parameters));
 }
 public DataSchemaError(string message, string document, int line, int column, ErrorSeverity severity)
     : this(message, document, line, column, DefaultPrefix, UndefinedErrorCode, severity)
 {
 }
 public ErrorStatus(ErrorSeverity severity, string description, string code)
 {
     this.SetStatus(severity, description, code);
 }
Beispiel #50
0
 public SQLException(Codes errorCode, ErrorSeverity severity, Exception innerException, params object[] paramsValue) : base(_resourceManager, (int)errorCode, severity, innerException, paramsValue)
 {
 }
 public void SetErrorCode(HResult hr)
 {
     if (hr.Succeeded)
     {
         ClearStatus();
     }
     else
     {
         this.Severity = ErrorSeverity.Error;
         this.Code = hr.ErrorCodeAsString;
         this.Description = hr.DetailedMessage;
     }
 }
Beispiel #52
0
 protected SQLException(ResourceManager resourceManager, int errorCode, ErrorSeverity severity, Exception innerException, params object[] paramsValue) : base(resourceManager, errorCode, severity, innerException, paramsValue)
 {
 }
        /// <summary>
        /// Creates the exception view model.
        /// </summary>
        /// <param name="e">The exception for this viewmodel.</param>
        /// <param name="environmentModel">The environment model.</param>
        /// <param name="isCritical">The severity of the error.</param>
        /// <returns></returns>
        /// <date>2013/01/16</date>
        /// <author>
        /// Jurie.smit
        /// </author>
        public static IExceptionViewModel CreateViewModel(Exception e, IEnvironmentModel environmentModel, ErrorSeverity isCritical = ErrorSeverity.Default)
        {
            // PBI 9598 - 2013.06.10 - TWR : added environmentModel parameter
            var vm = new ExceptionViewModel
                {
                    OutputText = CreateStringValue(e, null, true).ToString(),
                    StackTrace = e.StackTrace,
                    OutputPath = GetUniqueOutputPath(".txt"),
                    DisplayName = isCritical == ErrorSeverity.Critical ? StringResources.CritErrorTitle : StringResources.ErrorTitle,
                    
                };

            var attachedFiles = new Dictionary<string, string>();

           vm.Exception.Clear();
            vm.Exception.Add(Create(e, isCritical == ErrorSeverity.Critical));
            return vm;
        }
 /// <summary>
 /// Changes the error severity of service failures.
 /// </summary>
 /// <param name="errorSeverity">The new error severity of service failures.</param>
 /// <returns>Returns the current instance</returns>
 public ServiceDefinitionBuilder WithErrorSeverity(ErrorSeverity errorSeverity)
 {
     ErrorSeverity = errorSeverity;
     return(this);
 }
Beispiel #55
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, Exception AInnerException, params object[] AParams) : base(FResourceManager, (int)AErrorCode, ASeverity, AInnerException, AParams)
 {
 }
Beispiel #56
0
 public ScanException(ErrorSeverity severity, int code, string message, string details, string serverContext, DataphorException innerException)
     : base(severity, code, message, details, serverContext, innerException)
 {
 }
Beispiel #57
0
 protected QPException(ErrorSeverity severity, int code, string message, string details, string serverContext, AncestryException innerException)
     : base(severity, code, message, details, serverContext, innerException)
 {
 }
Beispiel #58
0
 public bool TryGetErrorSeverity(out ErrorSeverity edOrgType)
 {
     return(Enum.TryParse(Severity.CodeValue, true, out edOrgType));
 }
 /// <summary>
 /// Error handling for P4 messages
 /// </summary>
 /// <param name="ErrorMessage"></param>
 /// <param name="Severity"></param>
 /// <returns></returns>
 private bool ReportP4Error(string ErrorMessage, ErrorSeverity Severity)
 {
     if (Severity == ErrorSeverity.E_FATAL || Severity == ErrorSeverity.E_UNKNOWN || Severity == ErrorSeverity.E_FAILED)
     {
         log.Error(ErrorMessage);
         return false;
     }
     else
     {
         return true;
     }
 }
Beispiel #60
0
 public SQLException(Codes errorCode, ErrorSeverity severity, Exception innerException) : base(_resourceManager, (int)errorCode, severity, innerException, null)
 {
 }