Ticket Q495211
Visible to All Users

Documentation - Add information on exceptions silently caught by events/methods in DevExpress controls

created 12 years ago (modified 10 years ago)

Hello,
It's been reported multiple times, both by myself and by other customers, that your components sometimes catches exceptions thrown outside their boundaries and swallows / occults them unexpectedly:

Q490642 - XtraBars - BeforeShowMenu (when using a DocumentManager instance)
Q448229 - XtraGrid - RowUpdated event (long conversation on exception swallowing here)
Q21612 - (same as above)
Q487716 - XtraGrid - CustomRowFilter event
Q471004 - XtraPrinting - Exception swallowing for custom ICommandHandler
Q431436 - DXGrid - ColumnsPopulated event (I couldn't personnally check this one)
Q492778 - MVC GridView - BindToLinq
T171197 - XtraGrid with AutoFilterRow and Apply method
T172377 - XPServerCollectionSource when using ServerExceptionThrownAction.Rethrow (!)
As you (should) know, this kind of practice can seriously compromise an application's quality and reliability. As per .NET standards, a developer expects uncaught exceptions to bubble up the stack, to a point where it's logged for debugging purposes right before the app is closed to protect the end user's data. This coding pattern is very common and goes on par with Microsoft best practices.
Therefore, by hiding exceptions away, your components breaks up the framework's normal exception handling structure and introduces a significant risk for applications to be left running in a corrupted state.
Now, I don't want to go back to fighting with you guys to fix things up. You (most sadly) made it pretty clear that you won't.
However, I believe that each KNOWN scenarios like these should AT THE VERY LEAST be documented, both in a standalone list and as a subsection within the concerned members documentation. The workarounds that were proposed in the above tickets should be there too.
By doing this, you'd allow your customers to be aware of the situation and to take appropriate measures for exceptions thrown within these invokers (or nested further down the stack) to be properly dealt with.
This simple update in the documentation won't break any existing code (duh!), so there's no reason for you not to do it. Obviously it's not as good as fixing things up, but it's still far, FAR better than letting your customers find out in unpleasant ways that their application isn't working properly.
Please DevExpress, do the right thing here.

UPDATES:

2013-08-12 - Added Q492778
2014-11-11 - Added T171197
2014-11-13 - Added T172377 and links

Answers approved by DevExpress Support

created 11 years ago (modified 9 years ago)

We have implemented the functionality described in this ticket. It will be included in our next update(s).

Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

Additional information:

The following topics have been updated:
RepositoryItemTextEdit.BeforeShowMenu
ColumnView.RowUpdated
ColumnView.CustomRowFilter
ICommandHandler.HandleCommand
GridViewExtension.BindToLINQ

Information on swallowing an exception raised by a data source on applying a filter in the GridControl will be added in the Filtering Overview topic with the release of version 14.2.

    Comments (3)
    E E
    Eric Comte Marois 10 years ago

      Last link is still broken.
      Also, can anyone be kind enough to answer to the last posted comment below?

      Stan (DevExpress Support) 10 years ago

        Hi David,

        I apologize for missing your last message. The link is already updated, and I am going to answer your last comment.

        E E
        Eric Comte Marois 9 years ago

          Last link is STILL broken.

          created 12 years ago (modified 11 years ago)

          Thank you for your suggestion, Crono. I passed it to our documentation team. They will add the required information to our documentation in the future.

            Show previous comments (25)
            DevExpress Support Team 8 years ago

              Hello,
              Please see the following topic:
              Suppressing Exceptions
              Best regards, Alex

              E E
              Eric Comte Marois 8 years ago

                Hi Alex,

                Thanks for the link. Glad this documentation topic finally exists.

                Just a word though, about the "additional cases" section in which grid filtering is mentioned. Can you be more specific on how the grid's filtering ability may swallow exceptions thrown from the datasource? Do you mean through the IBindingListView interface?

                Thanks.

                DevExpress Support Team 8 years ago

                  Hello David,

                  This note describes exception swallowing when setting the DataController.FilterCriteria property implemented in the DataController.cs file. Exceptions are caught without taking the data source type into account.

                  Best regards, Alex

                  C#
                  class DataController public CriteriaOperator FilterCriteria {     get { return filterCriteria; }     set {         if(Equals(FilterCriteria, value))             return;         CriteriaOperator oldCriteria = FilterCriteria;         try {             filterCriteria = CriteriaOperator.Clone(value);             OnFilterExpressionChanged();         }         catch {             filterCriteria = oldCriteria;             OnFilterExpressionChanged();         }     } }

                  Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                  Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.