This project is read-only.
1
Vote

ComboBoxExtensions: report Operation errors

description

Could we add error reporting for Operations that have errors. At the moment they are silently ignored. Debug output alone would be fine.
 
 
Something like in ComboBoxExtensions.RaiseLoadCompleted(OperationBase op)
    {
        if (op.HasError)
        {
            ReportError(op.Error);
            op.MarkErrorAsHandled();
        }
 
       ...
 
 
    private void ReportError(Exception ex)
    {
        if (ex == null)
            return;

        Debug.WriteLine(ex.Message);
        Debug.WriteLine(ex.ToString());
        //Debug.WriteLine(ex.StackTrace);
 
        // Account for nested exceptions
        Exception innerException = ex.InnerException;
        while (innerException != null)
        {
            Debug.WriteLine(string.Format(System.Globalization.CultureInfo.CurrentUICulture, "Caused by: {0}", innerException.Message));
            Debug.WriteLine(innerException.StackTrace);
 
            innerException = innerException.InnerException;
        }            
    }

comments