本文整理汇总了C#中ErrorLevel类的典型用法代码示例。如果您正苦于以下问题:C# ErrorLevel类的具体用法?C# ErrorLevel怎么用?C# ErrorLevel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ErrorLevel类属于命名空间,在下文中一共展示了ErrorLevel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CodeError
public CodeError(ErrorType Type, ErrorLevel Level, CodeLine Line, string Remarks = "")
{
this.Type = Type;
this.Level = Level;
this.Line = Line;
this.Remarks = Remarks;
}
开发者ID:ninjabyte,项目名称:AncientClawAssembler,代码行数:7,代码来源:CodeError.cs
示例2: XmlValidationError
public XmlValidationError(ErrorLevel errorLevel, XmlErrorType errorType, string message, int? lineNumber = null)
{
ErrorLevel = errorLevel;
ErrorType = errorType;
Message = message;
LineNumber = lineNumber;
}
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:7,代码来源:XmlValidationError.cs
示例3: DataReturnUploadError
public DataReturnUploadError(ErrorLevel errorLevel, UploadErrorType errorType, string description, int lineNumber = 0)
{
ErrorType = errorType;
ErrorLevel = errorLevel;
Description = description;
LineNumber = lineNumber;
}
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:7,代码来源:DataReturnUploadError.cs
示例4: DaqException
internal DaqException(string errorMessage, ErrorCodes errorCode)
: base(errorMessage)
{
m_errorCode = errorCode;
m_level = ErrorLevel.Error;
m_lastResponse = null;
}
开发者ID:hamishharvey,项目名称:daqflex,代码行数:7,代码来源:DaqException.cs
示例5: LogEntry
/// <summary>
/// Запись в лог
/// </summary>
/// <param name="logLevel">Уровень</param>
/// <param name="message">Текст записи</param>
/// <param name="exception">Исключение</param>
public LogEntry(ErrorLevel logLevel, string message, Exception exception)
: this()
{
Level = logLevel;
Message = message;
Exception = exception;
}
开发者ID:Markeli,项目名称:BeardlyTeam,代码行数:13,代码来源:LogEntry.cs
示例6: LogEntry
public LogEntry(DateTime errorDateTime, ErrorLevel errorLevel, string tag,string message)
{
this.errorDateTime = errorDateTime;
this.errorLevel = errorLevel;
this.tag = tag;
this.message = message;
}
开发者ID:WebDaD,项目名称:Toolkit,代码行数:7,代码来源:LogEntry.cs
示例7: Handle
public void Handle(Exception exception, ErrorLevel errorLevel) {
if (exception is WrappedException)
_reportAnyManagedExceptions(exception.Message, ((WrappedException) exception).Exception, errorLevel);
else
_reportAnyManagedExceptions(exception.Message, exception, errorLevel);
if (errorLevel < SdeAppConfiguration.WarningLevel) return;
if (_exceptionAlreadyShown(exception.Message)) return;
if (Application.Current != null) {
_checkMainWindow();
if (IgnoreNoMainWindow) {
WindowProvider.ShowWindow(new ErrorDialog("Information", _getHeader(errorLevel) + exception.Message, errorLevel), WpfUtilities.TopWindow);
}
else {
if (!Application.Current.Dispatch(() => Application.Current.MainWindow != null && Application.Current.MainWindow.IsLoaded)) {
_showBasicError(_getHeader(errorLevel) + exception.Message, "Information");
return;
}
Application.Current.Dispatch(() => WindowProvider.ShowWindow(new ErrorDialog("Information", _getHeader(errorLevel) + exception.Message, errorLevel), Application.Current.MainWindow));
}
}
}
开发者ID:Tokeiburu,项目名称:RagnarokSDE,代码行数:26,代码来源:SDEErrorHandler.cs
示例8: FbxAsciiReader
/// <summary>
/// Creates a new reader
/// </summary>
/// <param name="stream"></param>
/// <param name="errorLevel"></param>
public FbxAsciiReader(Stream stream, ErrorLevel errorLevel = ErrorLevel.Checked)
{
if(stream == null)
throw new ArgumentNullException(nameof(stream));
this.stream = stream;
this.errorLevel = errorLevel;
}
开发者ID:Hengle,项目名称:FbxWriter,代码行数:12,代码来源:FbxAsciiReader.cs
示例9: LanguageError
public LanguageError(string file, string key, string message, ErrorLevel level = ErrorLevel.MissingString)
{
File = file;
Key = key;
Message = message;
Level = level;
}
开发者ID:CloneMMDDCVII,项目名称:Werewolf,代码行数:7,代码来源:LanguageHelper.cs
示例10: Output
public static void Output(string Message, ErrorLevel Level)
{
if (Level >= ErrorLevel.Error)
ErrorStream.WriteLine("{0}: {1}", Level.ToString(), Message);
else
Console.WriteLine("{0}: {1}", Level.ToString(), Message);
}
开发者ID:ninjabyte,项目名称:AncientClawAssembler,代码行数:7,代码来源:ConsoleLogHelper.cs
示例11: Log
public void Log(object message, ErrorLevel level, SocketKey key = null)
{
lock (_logLock)
{
entries.Add(new LogEntry()
{
timestamp = DateTime.Now,
level = level,
key = key,
message = MsgFmt(message)
});
}
switch (level)
{
case ErrorLevel.Info:
Debug.Log(KeyFmt(key) + message);
break;
case ErrorLevel.Warning:
Debug.LogWarning(KeyFmt(key) + message);
break;
case ErrorLevel.Error:
Debug.LogError(KeyFmt(key) + message);
break;
}
}
开发者ID:dshook,项目名称:centauri-tac,代码行数:26,代码来源:DebugService.cs
示例12: Error
public static void Error(this IEventRegistry registry, IEventSource source, int errorClass, int errorCode, ErrorLevel level, string message, string stackTrace, string errorSource)
{
var errorEvent = new ErrorEvent(source, errorClass, errorCode, message);
errorEvent.ErrorLevel(level);
errorEvent.StackTrace(stackTrace);
errorEvent.ErrorSource(errorSource);
registry.RegisterEvent(errorEvent);
}
开发者ID:furesoft,项目名称:deveeldb,代码行数:8,代码来源:EventRegistryExtensions.cs
示例13: Log
public static void Log(string message, ErrorLevel x, params string[] args)
{
string msg = Build (string.Format (message, args), x);
Console.WriteLine (msg);
if (autoFlush)
Flush ();
}
开发者ID:JoshMiles,项目名称:LHC,代码行数:8,代码来源:Logger.cs
示例14: CompilerException
public CompilerException(string fileName, int lineNumber, ErrorLevel level, int errorCode, string message)
{
_fileName = fileName;
_lineNumber = lineNumber;
_level = level;
_errorCode = errorCode;
_message = message;
}
开发者ID:joeferner,项目名称:fivevolt,代码行数:8,代码来源:CompilerException.cs
示例15: Error
public Error(IErrorSource source, string message, ErrorLevel errorLevel)
{
if (source == null) throw new ArgumentNullException(nameof(source));
_source = source;
_message = message;
_errorLevel = errorLevel;
}
开发者ID:CaptiveAire,项目名称:VPL,代码行数:8,代码来源:Error.cs
示例16: Message
// This is the only thing that needs to be overriden
public virtual bool Message(MessageSource source, ErrorLevel level, IToken tok, string msg) {
bool discard = (ErrorsOnly && level != ErrorLevel.Error) || // Discard non-errors if ErrorsOnly is set
(tok is TokenWrapper && !(tok is NestedToken) && !(tok is RefinementToken)); // Discard wrapped tokens, except for nested and refinement
if (!discard) {
AllMessages[level].Add(new ErrorMessage { token = tok, message = msg });
}
return !discard;
}
开发者ID:ggrov,项目名称:tacny,代码行数:9,代码来源:Reporting.cs
示例17: LogException
public static void LogException(object ex, ErrorLevel level)
{
var e = ex as Exception;
if (e != null)
{
Log(String.Format("{0} - {1}\r\n{2}", level, e.Message, e.StackTrace));
}
}
开发者ID:hamadx99,项目名称:Terraria-Map-Editor,代码行数:8,代码来源:ErrorLogging.cs
示例18: Add
/// <summary>
/// Adds an error message to the Error List.
/// </summary>
/// <param name="_level">Error level.</param>
/// <param name="_errorCode">Error code.</param>
/// <param name="_errorText">Error message text.</param>
/// <param name="_lineNum">The source code line that raises the error message.</param>
public static void Add(ErrorLevel _level, string _errorCode, string _errorText, int _lineNum)
{
OutputErrorMessage.Instance.Code = _errorCode;
OutputErrorMessage.Instance.Level = _level;
OutputErrorMessage.Instance.LineNum = _lineNum;
OutputErrorMessage.Instance.Text = _errorText;
Api.SendMessage(Session.CurrentSession.MDIParent.Handle.ToInt32(),
Convert.ToInt32(MessageHelper.Messages.AddErrorMessage), 0, 0);
}
开发者ID:daxnet,项目名称:guluwin,代码行数:16,代码来源:ErrorList.cs
示例19: ErrorEvent
public ErrorEvent(Exception error, int errorCode, ErrorLevel level)
{
if (error == null)
throw new ArgumentNullException("error");
Error = error;
ErrorCode = errorCode;
Level = level;
}
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:9,代码来源:ErrorEvent.cs
示例20: CompilerError
public CompilerError ()
{
ErrorLevel = ErrorLevel.None;
ErrorMessage = String.Empty;
SourceFile = String.Empty;
ErrorNumber = 0;
SourceColumn = 0;
SourceLine = 0;
}
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:CompilerError.cs
注:本文中的ErrorLevel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论