public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, Exception innerException) : base(message, input, innerException) { this._grammarDecisionDescription = grammarDecisionDescription; this._decisionNumber = decisionNumber; this._stateNumber = stateNumber; }
/// <summary> /// True the specified shouldBeTrue and message. /// </summary> /// <param name="shouldBeTrue">If set to <c>true</c> should be true.</param> /// <param name="message">Message.</param> public static void True(bool shouldBeTrue, string message = null, AssertLevel assertLevel = AssertLevel.Warning, params string[] tags) { if(!shouldBeTrue) { if(string.IsNullOrEmpty(message)) message = "(No Message)"; var logType = LogType.Warning; var fatalException = default(System.Exception); if(assertLevel == AssertLevel.Critical) { logType = LogType.Error; } else if(assertLevel == AssertLevel.Fatal) { logType = LogType.Exception; fatalException = new System.Exception("Fatal Assert : " + message); } Logger.LogAssert("Assert Fail : " + message, logType, fatalException, tags); // just quit application if fatal assert is found // if(assertLevel == AssertLevel.Fatal) // { // throw fatalException; // } } }
private readonly IToken _templateToken; // overall token pulled from group file #endregion Fields #region Constructors public TemplateLexerMessage(string sourceName, string message, IToken templateToken, Exception cause) : base(ErrorType.LEXER_ERROR, null, cause, null) { this._message = message; this._templateToken = templateToken; this._sourceName = sourceName; }
public Exception(System.Exception ex) { InitializeComponent(); _exception = ex; lblContent.Text = ex.ToString(); Activate(); }
IToken templateToken; // overall token pulled from group file #endregion Fields #region Constructors public TemplateLexerMessage(string srcName, string msg, IToken templateToken, Exception cause) : base(ErrorType.LEXER_ERROR, null, cause, null) { this.msg = msg; this.templateToken = templateToken; this.srcName = srcName; }
public ANTLRMessage([NotNull] ErrorType errorType, [Nullable] Exception e, IToken offendingToken, params object[] args) { this.errorType = errorType; this.e = e; this.args = args; this.offendingToken = offendingToken; }
public TemplateCompiletimeMessage(ErrorType error, string sourceName, IToken templateToken, IToken token, Exception cause, object arg, object arg2) : base(error, null, cause, arg, arg2) { this._templateToken = templateToken; this._token = token; this._sourceName = sourceName; }
public Exception(System.Exception ex) { InitializeComponent(); DwmDropShadow.DropShadowToWindow(this); _exception = ex; lblContent.Text = ex.ToString(); }
public MismatchedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; if (tokenNames != null) this._tokenNames = new List<string>(tokenNames).AsReadOnly(); }
public TemplateMessage(ErrorType error, Template template, Exception source, object arg1, object arg2) { this.ErrorType = error; this.Template = template; this.Source = source; this.Argument1 = arg1; this.Argument2 = arg2; }
public static void PrintStackTrace( Exception e, TextWriter writer ) { writer.WriteLine( e.ToString() ); string trace = e.StackTrace ?? string.Empty; foreach ( string line in trace.Split( '\n', '\r' ) ) { if ( !string.IsNullOrEmpty( line ) ) writer.WriteLine( " " + line ); } }
public void HandleExpected(Exception ex) { EasyTracker.Tracker.SendException(ex.Message, Throwable.FromException(ex), false); FlurryAgent.OnError(ex.GetType().Name, ex.Message, Throwable.FromException(ex)); Crittercism.LogHandledException(Throwable.FromException(ex)); Log.Error(_context.GetType().Name, ex.Message); string errorMessage = _context.Resources.GetString(Resource.String.CommonErrorMessage); AlertDialog dialog = new AlertDialog.Builder(_context).SetMessage(errorMessage).Create(); dialog.SetCanceledOnTouchOutside(true); dialog.Show(); }
public static void TrackAppException(string activity, String method, Exception exception, Boolean isFatalException) { var builder = new HitBuilders.ExceptionBuilder(); var exceptionMessageToTrack = string.Format("{0}, Method : {1}\nException type : {2}, Exception Message : {3}\nStack Trace : \n{4}", activity, method, exception.GetType(),exception.Message, exception.StackTrace); builder.SetDescription(exceptionMessageToTrack); builder.SetFatal(isFatalException); Rep.Instance.GaTracker.Send(builder.Build()); }
public XmlPullParserException(string msg, org.xmlpull.v1.XmlPullParser parser, System.Exception chain) : base((msg == null ? string.Empty : msg + " ") + (parser == null ? string.Empty : "(position:" + parser.getPositionDescription() + ") ") + (chain == null ? string.Empty : "caused by: " + chain)) { // for license please see accompanying LICENSE.txt file (available also at http://www.xmlpull.org/) if (parser != null) { this.row = parser.getLineNumber(); this.column = parser.getColumnNumber(); } this.detail = chain; }
public bool Start(System.Action p) { #if DEBUG Debug.Assert(null != p); #endif // DEBUG if (running) { return false; } running = true; proc = p; exception = null; thread = null; ThreadPool.QueueUserWorkItem(BkgProc, this); return true; }
private void BkgEnd(System.Exception e = null) { lock(this) { // if canceled and run again, maybe thread is not CurrentThread but running is true if (Thread.CurrentThread == thread) { // 1. thread = null; if (null != e) { exception = e; } // 2. running = false; } } }
private static Protobuf.Exception GetExceptionResponse(Exception exc) { Alachisoft.NCache.Common.Protobuf.Exception ex = new Alachisoft.NCache.Common.Protobuf.Exception(); ex.message = exc.Message; ex.exception = exc.ToString(); if (exc is OperationFailedException) ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.OPERATIONFAILED; else if (exc is Runtime.Exceptions.AggregateException) ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.AGGREGATE; else if (exc is ConfigurationException) ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.CONFIGURATION; else if (exc is OperationNotSupportedException) ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.NOTSUPPORTED; else if (exc is TypeIndexNotDefined) ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.TYPE_INDEX_NOT_FOUND; else if (exc is AttributeIndexNotDefined) ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.ATTRIBUTE_INDEX_NOT_FOUND; else if (exc is StateTransferInProgressException) ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.STATE_TRANSFER_EXCEPTION; else ex.type = Alachisoft.NCache.Common.Protobuf.Exception.Type.GENERALFAILURE; return ex; }
public EarlyExitException(string message, Exception innerException) : base(message, innerException) { }
public MismatchedNotSetException(string message, BitSet expecting, IIntStream input, Exception innerException) : base(message, expecting, input, innerException) { }
public GetUpDateFileCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; }
/// <summary> /// Initializes a new instance of the <see cref="WebInspectorException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception. /// </summary> /// <param name="message"> /// The error message that explains the reason for the exception. /// </param> /// <param name="inner"> /// The exception that is the cause of the current exception, or <see langword="null"/> if no inner exception is specified. /// </param> public WebInspectorException(string message, System.Exception inner) : base(message, inner) { }
public PubSubContextException(string message, System.Exception innerException) : base(message, innerException) { }
public ApiException(System.Exception ex, int statusCode = 500) : base(ex.Message) { StatusCode = statusCode; }
public WoxPluginException(string pluginName, string msg, System.Exception e) : base($"{pluginName} : {msg}", e) { PluginName = pluginName; }
/// <summary> /// Report firmware command errors to the user. /// </summary> /// <param name="command">The firmware-related command that failed.</param> /// <param name="errorMessage">The message generated from the command execution code.</param> /// <param name="exception">The exception that caused the error, if applicable.</param> /// <returns><c>true</c> if the error was reported to the user.</returns> internal static bool ErrorHandler(INTV.LtoFlash.Model.Commands.ProtocolCommandId command, string errorMessage, System.Exception exception) { var handled = false; var title = string.Empty; var messageFormat = string.Empty; switch (command) { case Model.Commands.ProtocolCommandId.FirmwareEraseSecondary: handled = true; title = Resources.Strings.RestoreFirmwareCommand_Failed_Title; messageFormat = Resources.Strings.RestoreFirmwareCommand_Failed_Message_Format; break; case Model.Commands.ProtocolCommandId.FirmwareProgramSecondary: handled = true; title = Resources.Strings.Firmware_UpdateFirmwareCommand_Failed_Title; messageFormat = Resources.Strings.Firmware_UpdateFirmwareCommand_Failed_Message_Format; break; case Model.Commands.ProtocolCommandId.FirmwareGetRevisions: handled = true; title = Resources.Strings.GetFirmwareRevisionsCommand_Failed_Title; messageFormat = Resources.Strings.GetFirmwareRevisionsCommand_Failed_Message_Format; break; case Model.Commands.ProtocolCommandId.FirmwareValidateImageInRam: handled = true; title = Resources.Strings.ProtocolCommandId_FirmwareValidateImageInRam_Title; messageFormat = Resources.Strings.ProtocolCommandId_FirmwareValidateImageInRam_Failed; break; } if (handled) { var message = string.Format(System.Globalization.CultureInfo.CurrentCulture, messageFormat, errorMessage); OSMessageBox.Show(message, title); } return(handled); }
public PeerMessageSendFailure(IPEndPoint peerEndPoint, Message message, System.Exception exception) : base(peerEndPoint) { this.Message = message; this.Exception = exception; }
public CliErrorException(string message, System.Exception innerException) : base(message, innerException) { }
public virtual bool IsRetriableException(System.Exception exception) { throw null; }
public virtual bool IsRetriable(Azure.Core.HttpMessage message, System.Exception exception) { throw null; }
public DatasetNotFoundException(string message, System.Exception ex) : base(message, ex) { }
public RudderException(string message, System.Exception inner) : base(message, inner) { }
public ConnectionException(string message, System.Exception inner) : base(message, inner) { }
public MismatchedSetException(string message, Exception innerException) : base(message, innerException) { }
public SwaggerException(string message, int statusCode, string response, System.Collections.Generic.Dictionary <string, System.Collections.Generic.IEnumerable <string> > headers, System.Exception innerException) : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + response.Substring(0, response.Length >= 512 ? 512 : response.Length), innerException) { StatusCode = statusCode; Response = response; Headers = headers; }
public EntityOutOfRangeException(string message, System.Exception innerException) : base(message, innerException) { }
public InvalidUrlRewriteFormatException(System.Xml.Linq.XElement element, string message, System.Exception innerException) { }
public MismatchedTokenException(string message, Exception innerException) : base(message, innerException) { }
public RecognitionException(string message, Exception innerException) : this(message, null, innerException) { }
public MismatchedSetException(string message, BitSet expecting, IIntStream input, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; }
public ExecutionException(string message, System.Exception innerException) : base(string.Format("Execution failed! - {0}", message), innerException) { }
public RewriteCardinalityException(string message, string elementDescription, Exception innerException) : base(message, innerException) { _elementDescription = elementDescription; }
public NeedVersionUpdateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; }
///A little helper function to log errors easier public Status Fail(System.Exception e) { ParadoxNotion.Services.Logger.LogException(e, "Execution Failure", this); status = Status.Failure; return(Status.Failure); }
public GetValueException(string error, System.Exception inner) : base(error, inner) { this.error = error; }
public RewriteCardinalityException(string elementDescription, Exception innerException) : this(elementDescription, elementDescription, innerException) { }
/// <summary> /// Creates a <see cref="SubscriberStatus.ExceptionContinue"/> <see cref="Result"/>. /// </summary> /// <param name="exception">The <see cref="System.Exception"/>.</param> /// <param name="reason">The optional reason.</param> /// <returns>The <see cref="SubscriberStatus.ExceptionContinue"/> <see cref="Result"/>.</returns> internal static Result ExceptionContinue(System.Exception exception, string?reason) => new Result { Status = SubscriberStatus.ExceptionContinue, Exception = exception, Reason = reason ?? exception.Message };
public MismatchedRangeException(string message, int a, int b, IIntStream input, Exception innerException) : base(message, input, innerException) { this._a = a; this._b = b; }
/** constructor */ public ReThrowException(string a_message, System.Exception a_inner_exception) : base(a_message, a_inner_exception) { }
public MissingTokenException(string message, int expecting, IIntStream input, object inserted, IList<string> tokenNames, Exception innerException) : base(message, expecting, input, tokenNames, innerException) { this._inserted = inserted; }
public LimitException(string message, System.Exception inner) : base(message, inner) { }
public ToolMessage(ErrorType errorType, Exception e, params object[] args) : base(errorType, e, new CommonToken(TokenTypes.Invalid), args) { }
/// <summary> /// Creates a LWGraphException object with a message and a cause to the exception. /// </summary> /// <param name="message"> the message </param> /// <param name="cause"> the cause to the exception </param> public LWGraphException(string message, System.Exception cause) : base(message, cause) { }
public RecognitionException(string message, IIntStream input, Exception innerException) : base(message, innerException) { this._input = input; if (input != null) { this._index = input.Index; if (input is ITokenStream) { this._token = ((ITokenStream)input).LT(1); this._line = _token.Line; this._charPositionInLine = _token.CharPositionInLine; } ITreeNodeStream tns = input as ITreeNodeStream; if (tns != null) { ExtractInformationFromTreeNodeStream(tns); } else { ICharStream charStream = input as ICharStream; if (charStream != null) { this._c = input.LA(1); this._line = ((ICharStream)input).Line; this._charPositionInLine = ((ICharStream)input).CharPositionInLine; } else { this._c = input.LA(1); } } } }
public viewProfilesJSONCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; }
public MismatchedNotSetException(string message, Exception innerException) : base(message, innerException) { }
static public void Trace(System.Exception e) { CCITracing.InternalTraceCall(2); System.Diagnostics.Trace.WriteLine("ExceptionInfo: \t" + e.ToString()); }
/// <summary>Record that an exception occurred while executing /// this merge /// </summary> internal virtual void SetException(System.Exception error) { lock (this) { this.error = error; } }
public ValidationException(string message, System.Exception innerException) { }
public EarlyExitException(string message, int decisionNumber, IIntStream input, Exception innerException) : base(message, input, innerException) { this._decisionNumber = decisionNumber; }
public WebSocketException(string message, System.Exception innerException) { }