Microsoft.VisualStudio.Project.CciTracing.Trace C# (CSharp) Method

Trace() private method

private Trace ( System exception ) : void
exception System
return void
        public static void Trace(System.Exception exception)
        {
            if (exception == null)
                throw new ArgumentNullException("exception");

            CciTracing.InternalTraceCall(2);
            System.Diagnostics.Trace.WriteLine("ExceptionInfo: \t" + exception.ToString());
        }

Same methods

CciTracing::Trace ( string output ) : void

Usage Example

Esempio n. 1
0
        public virtual void CreateDirectory(string newName)
        {
            if (String.IsNullOrEmpty(newName))
            {
                throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "newName");
            }

            try
            {
                // on a new dir && enter, we get called with the same name (so do nothing if name is the same
                char[] dummy = new char[1];
                dummy[0] = Path.DirectorySeparatorChar;
                string oldDir = this.Url;
                oldDir = oldDir.TrimEnd(dummy);
                string strNewDir = Path.Combine(Path.GetDirectoryName(oldDir), newName);

                if (!String.Equals(strNewDir, oldDir, StringComparison.OrdinalIgnoreCase))
                {
                    if (Directory.Exists(strNewDir))
                    {
                        throw new InvalidOperationException(SR.GetString(SR.DirectoryExistError, CultureInfo.CurrentUICulture));
                    }
                    Directory.CreateDirectory(strNewDir);
                }
            }
            //TODO - this should not digest all exceptions.
            catch (System.Exception e)
            {
                CciTracing.Trace(e);
                throw;
            }
        }
All Usage Examples Of Microsoft.VisualStudio.Project.CciTracing::Trace