SharpBits.Base.BitsManager.PublishException C# (CSharp) Method

PublishException() private method

Publishes the exception.
private PublishException ( BitsJob job, COMException exception ) : void
job BitsJob The job the exception occurred.
exception System.Runtime.InteropServices.COMException The exception.
return void
        internal void PublishException(BitsJob job, COMException exception)
        {
            if (this.interfaceError == null)
            {
                return;
            }

            string description = this.GetErrorDescription(exception.ErrorCode);
            this.interfaceError(this, new BitsInterfaceNotificationEventArgs(job, exception, description));
        }

Usage Example

Beispiel #1
0
 public BitsFiles EnumFiles()
 {
     try
     {
         IEnumBackgroundCopyFiles fileList = null;
         this.job.EnumFiles(out fileList);
         this.files = new BitsFiles(this, fileList);
     }
     catch (COMException exception)
     {
         manager.PublishException(this, exception);
     }
     return(this.files);
 }