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;
 }
Ejemplo n.º 2
0
        /// <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;
            //				}
            }
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 public Exception(System.Exception ex)
 {
     InitializeComponent();
     _exception = ex;
     lblContent.Text = ex.ToString();
     Activate();
 }
Ejemplo n.º 5
0
        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;
        }
Ejemplo n.º 6
0
 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;
 }
Ejemplo n.º 7
0
 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;
 }
Ejemplo n.º 8
0
        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();
        }
Ejemplo n.º 10
0
 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;
 }
Ejemplo n.º 11
0
 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 );
     }
 }
Ejemplo n.º 12
0
 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();
 }
Ejemplo n.º 13
0
        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());
        }
Ejemplo n.º 14
0
		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;
		}
Ejemplo n.º 15
0
		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;
		}
Ejemplo n.º 16
0
		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;
				}
			}
		}
Ejemplo n.º 17
0
        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;
        }
Ejemplo n.º 18
0
 public EarlyExitException(string message, Exception innerException)
     : base(message, innerException)
 {
 }
 public MismatchedNotSetException(string message, BitSet expecting, IIntStream input, Exception innerException)
     : base(message, expecting, input, innerException)
 {
 }
Ejemplo n.º 20
0
 public GetUpDateFileCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
     base(exception, cancelled, userState)
 {
     this.results = results;
 }
Ejemplo n.º 21
0
 /// <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)
 {
 }
Ejemplo n.º 22
0
 public PubSubContextException(string message, System.Exception innerException)
     : base(message, innerException)
 {
 }
Ejemplo n.º 23
0
 public ApiException(System.Exception ex, int statusCode = 500) : base(ex.Message)
 {
     StatusCode = statusCode;
 }
Ejemplo n.º 24
0
 public WoxPluginException(string pluginName, string msg, System.Exception e)
     : base($"{pluginName} : {msg}", e)
 {
     PluginName = pluginName;
 }
Ejemplo n.º 25
0
        /// <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;
 }
Ejemplo n.º 27
0
 public CliErrorException(string message, System.Exception innerException) : base(message, innerException)
 {
 }
Ejemplo n.º 28
0
 public virtual bool IsRetriableException(System.Exception exception)
 {
     throw null;
 }
Ejemplo n.º 29
0
 public virtual bool IsRetriable(Azure.Core.HttpMessage message, System.Exception exception)
 {
     throw null;
 }
Ejemplo n.º 30
0
 public DatasetNotFoundException(string message, System.Exception ex) : base(message, ex)
 {
 }
Ejemplo n.º 31
0
 public RudderException(string message, System.Exception inner) : base(message, inner)
 {
 }
Ejemplo n.º 32
0
 public ConnectionException(string message, System.Exception inner) : base(message, inner)
 {
 }
Ejemplo n.º 33
0
 public MismatchedSetException(string message, Exception innerException)
     : base(message, innerException)
 {
 }
Ejemplo n.º 34
0
 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)
 {
 }
Ejemplo n.º 36
0
 public InvalidUrlRewriteFormatException(System.Xml.Linq.XElement element, string message, System.Exception innerException)
 {
 }
Ejemplo n.º 37
0
 public MismatchedTokenException(string message, Exception innerException)
     : base(message, innerException)
 {
 }
Ejemplo n.º 38
0
 public RecognitionException(string message, Exception innerException)
     : this(message, null, innerException)
 {
 }
Ejemplo n.º 39
0
 public MismatchedSetException(string message, BitSet expecting, IIntStream input, Exception innerException)
     : base(message, input, innerException)
 {
     this._expecting = expecting;
 }
Ejemplo n.º 40
0
 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;
 }
Ejemplo n.º 42
0
 public NeedVersionUpdateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
     base(exception, cancelled, userState)
 {
     this.results = results;
 }
Ejemplo n.º 43
0
 ///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);
 }
Ejemplo n.º 44
0
 public GetValueException(string error, System.Exception inner)
     : base(error, inner)
 {
     this.error = error;
 }
 public RewriteCardinalityException(string elementDescription, Exception innerException)
     : this(elementDescription, elementDescription, innerException)
 {
 }
Ejemplo n.º 46
0
 /// <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
 };
Ejemplo n.º 47
0
 public MismatchedRangeException(string message, int a, int b, IIntStream input, Exception innerException)
     : base(message, input, innerException)
 {
     this._a = a;
     this._b = b;
 }
Ejemplo n.º 48
0
 /** constructor
  */
 public ReThrowException(string a_message, System.Exception a_inner_exception)
     : base(a_message, a_inner_exception)
 {
 }
Ejemplo n.º 49
0
 public MissingTokenException(string message, int expecting, IIntStream input, object inserted, IList<string> tokenNames, Exception innerException)
     : base(message, expecting, input, tokenNames, innerException)
 {
     this._inserted = inserted;
 }
Ejemplo n.º 50
0
 public LimitException(string message, System.Exception inner) : base(message, inner)
 {
 }
Ejemplo n.º 51
0
 public ToolMessage(ErrorType errorType, Exception e, params object[] args)
     : base(errorType, e, new CommonToken(TokenTypes.Invalid), args)
 {
 }
Ejemplo n.º 52
0
 /// <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)
 {
 }
Ejemplo n.º 53
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 54
0
 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)
 {
 }
Ejemplo n.º 56
0
 static public void Trace(System.Exception e)
 {
     CCITracing.InternalTraceCall(2);
     System.Diagnostics.Trace.WriteLine("ExceptionInfo: \t" + e.ToString());
 }
Ejemplo n.º 57
0
 /// <summary>Record that an exception occurred while executing
 /// this merge 
 /// </summary>
 internal virtual void SetException(System.Exception error)
 {
     lock (this)
     {
         this.error = error;
     }
 }
Ejemplo n.º 58
0
 public ValidationException(string message, System.Exception innerException)
 {
 }
Ejemplo n.º 59
0
 public EarlyExitException(string message, int decisionNumber, IIntStream input, Exception innerException)
     : base(message, input, innerException)
 {
     this._decisionNumber = decisionNumber;
 }
 public WebSocketException(string message, System.Exception innerException)
 {
 }