コード例 #1
0
ファイル: Status.cs プロジェクト: Caraul/FabricAdcHub
 public Status(MessageHeader header, ErrorSeverity errorSeverity, ErrorCode errorCode, string description)
     : base(header, CommandType.Status)
 {
     Severity = errorSeverity;
     Code = errorCode;
     Description = description;
 }
コード例 #2
0
ファイル: AncestryException.cs プロジェクト: Ancestry/DotQL
 public AncestryException(ErrorSeverity severity, int errorCode, string message, Exception innerException)
     : base(message, innerException)
 {
     _code = errorCode;
     _severity = severity;
     HResult = OR_E_EXCEPTION;
 }
コード例 #3
0
ファイル: ValidationErrorBase.cs プロジェクト: Microsoft/RTVS
 public ValidationErrorBase(ITextRange range, string message, ErrorLocation location, ErrorSeverity severity) :
     base(range)
 {
     Message = message;
     Severity = severity;
     Location = location;
 }
コード例 #4
0
ファイル: AncestryException.cs プロジェクト: Ancestry/DotQL
 public AncestryException(int errorCode, string message)
     : base(message)
 {
     _code = errorCode;
     _severity = ErrorSeverity.Application;
     HResult = OR_E_EXCEPTION;
 }
コード例 #5
0
 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();
     }
 }
コード例 #7
0
ファイル: SyntaxException.cs プロジェクト: Ancestry/DotQL
 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;
 }
コード例 #8
0
ファイル: AutoCompleteList.cs プロジェクト: MafiaMoe/mIDE
 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;
 }
コード例 #9
0
ファイル: ErrorListItem.cs プロジェクト: jhorv/dotnetpad
 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;
 }
コード例 #10
0
ファイル: Extensions.cs プロジェクト: BikS2013/bUtility
 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
     });
 }
コード例 #11
0
ファイル: AstNode.cs プロジェクト: jonorossi/cvsi
 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);
     }
 }
コード例 #12
0
ファイル: LogClient.cs プロジェクト: VDBBjorn/toggl_mobile
        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
        }
コード例 #13
0
ファイル: AncestryException.cs プロジェクト: Ancestry/DotQL
 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;
     }
 }
コード例 #14
0
ファイル: LogClient.cs プロジェクト: eatskolnikov/mobile
        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);
            }
        }
コード例 #15
0
		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;
		}
コード例 #16
0
ファイル: PhpCompiler.CLR.cs プロジェクト: dw4dev/Phalanger
			/// <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;
			}
コード例 #17
0
 public void SetStatus(ErrorSeverity severity, string description, string code)
 {
     this.Severity = severity;
     this.Description = description;
     this.Code = code;
 }
コード例 #18
0
ファイル: XmppEvents.cs プロジェクト: Coselding/xmpp
 /// <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;
 }
コード例 #19
0
 public void ClearStatus()
 {
     this.Severity = ErrorSeverity.None;
     this.Code = null;
     this.Description = null;
 }
コード例 #20
0
 public DataSchemaError(string message, string document, int errorCode, ErrorSeverity severity)
     : this(message, document, 0, 0, DefaultPrefix, errorCode, severity)
 {
 }
コード例 #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
     });
 }
コード例 #22
0
        /// <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);
        }
コード例 #23
0
 public SqlServerError(string message, string document, ErrorSeverity severity)
     : this(message, null, document, 0, 0, Constants.UndefinedErrorCode, severity)
 {
 }
コード例 #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));
 }
コード例 #25
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, string AStatement, params object[] AParams) : base(FResourceManager, (int)AErrorCode, ASeverity, null, AParams)
 {
     FStatement = AStatement;
 }
コード例 #26
0
 public ErrorDescriptor(ErrorSeverity severity, string message)
 {
     Severity = severity;
     Message  = message;
 }
コード例 #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));
 }
コード例 #28
0
ファイル: P4CommandTest.cs プロジェクト: startere/p4api.net
        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
        }
コード例 #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);
 }
コード例 #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);
 }
コード例 #31
0
ファイル: Logger.cs プロジェクト: oguna/AssimpSharp
 public abstract bool DetatchStream(LogStream stream, ErrorSeverity severity = ErrorSeverity.Debugging | ErrorSeverity.Err | ErrorSeverity.Warn | ErrorSeverity.Info);
コード例 #32
0
 public DataSchemaError(string message, Exception innerException, ErrorSeverity severity)
     : this(message, innerException, string.Empty, 0, severity)
 {
 }
コード例 #33
0
 public ScanException(Codes errorCode, ErrorSeverity severity, params object[] paramsValue) : base(_resourceManager, (int)errorCode, severity, null, paramsValue)
 {
 }
コード例 #34
0
 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);
 }
コード例 #36
0
 public DataSchemaError(DataSchemaError source, ErrorSeverity severity)
     : this(source.Message, source.Document, source.Line, source.Column, source.Prefix, source.ErrorCode, severity)
 {
 }
コード例 #37
0
 public ScanException(Codes errorCode, ErrorSeverity severity) : base(_resourceManager, (int)errorCode, severity, null, null)
 {
 }
コード例 #38
0
ファイル: XmppEvents.cs プロジェクト: Coselding/xmpp
 /// <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));
 }
コード例 #39
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, Exception AInnerException, string AStatement) : base(FResourceManager, (int)AErrorCode, ASeverity, AInnerException, null)
 {
     FStatement = AStatement;
 }
コード例 #40
0
 public void logerror(string message, string details, ErrorType errorType, ErrorSeverity errorSeverity)
 {
     //throw new NotImplementedException();
 }
コード例 #41
0
 public DataSchemaError(string message, ErrorSeverity severity)
     : this(message, string.Empty, severity)
 {
 }
コード例 #42
0
 protected ConnectionException(ResourceManager AResourceManager, int AErrorCode, ErrorSeverity ASeverity, Exception AInnerException, params object[] AParams) : base(AResourceManager, AErrorCode, ASeverity, AInnerException, AParams)
 {
 }
コード例 #43
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, Exception AInnerException) : base(FResourceManager, (int)AErrorCode, ASeverity, AInnerException, null)
 {
 }
コード例 #44
0
ファイル: QPException.cs プロジェクト: Ancestry/DotQL
 // Constructors
 protected QPException(ResourceManager resourceManager, int errorCode, ErrorSeverity severity, Exception innerException, params object[] paramsValue)
     : base(resourceManager, errorCode, severity, innerException, paramsValue)
 {
 }
コード例 #45
0
ファイル: BugsnagClient.cs プロジェクト: jblj/mobile
        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);
        }
コード例 #46
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);
            }

            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,
            });
        }
コード例 #47
0
ファイル: XmppEvents.cs プロジェクト: Coselding/xmpp
 /// <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));
 }
コード例 #48
0
 public DataSchemaError(string message, string document, int line, int column, ErrorSeverity severity)
     : this(message, document, line, column, DefaultPrefix, UndefinedErrorCode, severity)
 {
 }
コード例 #49
0
 public ErrorStatus(ErrorSeverity severity, string description, string code)
 {
     this.SetStatus(severity, description, code);
 }
コード例 #50
0
ファイル: SQLException.cs プロジェクト: laszlo-kiss/Dataphor
 public SQLException(Codes errorCode, ErrorSeverity severity, Exception innerException, params object[] paramsValue) : base(_resourceManager, (int)errorCode, severity, innerException, paramsValue)
 {
 }
コード例 #51
0
 public void SetErrorCode(HResult hr)
 {
     if (hr.Succeeded)
     {
         ClearStatus();
     }
     else
     {
         this.Severity = ErrorSeverity.Error;
         this.Code = hr.ErrorCodeAsString;
         this.Description = hr.DetailedMessage;
     }
 }
コード例 #52
0
ファイル: SQLException.cs プロジェクト: laszlo-kiss/Dataphor
 protected SQLException(ResourceManager resourceManager, int errorCode, ErrorSeverity severity, Exception innerException, params object[] paramsValue) : base(resourceManager, errorCode, severity, innerException, paramsValue)
 {
 }
コード例 #53
0
        /// <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;
        }
コード例 #54
0
 /// <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);
 }
コード例 #55
0
 public ConnectionException(Codes AErrorCode, ErrorSeverity ASeverity, Exception AInnerException, params object[] AParams) : base(FResourceManager, (int)AErrorCode, ASeverity, AInnerException, AParams)
 {
 }
コード例 #56
0
 public ScanException(ErrorSeverity severity, int code, string message, string details, string serverContext, DataphorException innerException)
     : base(severity, code, message, details, serverContext, innerException)
 {
 }
コード例 #57
0
ファイル: QPException.cs プロジェクト: Ancestry/DotQL
 protected QPException(ErrorSeverity severity, int code, string message, string details, string serverContext, AncestryException innerException)
     : base(severity, code, message, details, serverContext, innerException)
 {
 }
コード例 #58
0
 public bool TryGetErrorSeverity(out ErrorSeverity edOrgType)
 {
     return(Enum.TryParse(Severity.CodeValue, true, out edOrgType));
 }
コード例 #59
0
 /// <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;
     }
 }
コード例 #60
0
ファイル: SQLException.cs プロジェクト: laszlo-kiss/Dataphor
 public SQLException(Codes errorCode, ErrorSeverity severity, Exception innerException) : base(_resourceManager, (int)errorCode, severity, innerException, null)
 {
 }