Exemple #1
0
        public override string ToString()
        {
            StatusInfo info = (StatusInfo)tbl[this._error_id];

            if (_internalSummary != null)
            {
                return(_internalSummary + System.Environment.NewLine + _internalDescription + System.Environment.NewLine + System.Environment.NewLine + System.Environment.NewLine + _internalStackTrace);
            }
            string strMsg = info.Summary + System.Environment.NewLine + info.Description;

            string caller = "";

            if (this._ex != null)
            {
                Exception trueEx = _ex;
                while (trueEx.InnerException != null)
                {
                    trueEx = _ex.InnerException;
                }
                caller = System.Environment.NewLine + trueEx.Message + System.Environment.NewLine + trueEx.StackTrace + System.Environment.NewLine + getExceptionInformation(trueEx);
            }
            else
            {
                if (this._frame != null)
                {
                    caller = System.Environment.NewLine + this._frame.GetFileName() + "#" + this._frame.GetMethod().Name + "(" + this._frame.GetFileLineNumber().ToString() + ")";
                }
            }

            if (this._arguments == null)
            {
                return(strMsg + caller);
            }
            return(String.Format(strMsg, this._arguments) + caller);
        }
Exemple #2
0
        private string getTitle()
        {
            string strMsg = null;

            lock (tbl)
            {
                StatusInfo info = (StatusInfo)tbl[this._error_id];
                strMsg = info.Summary;
            }

            if (_arguments == null)
            {
                return(strMsg);
            }
            return(String.Format(strMsg, Arguments));
        }