On 10/04/2012 18:03, Marvin Humphrey wrote:
On Tue, Apr 10, 2012 at 3:21 AM, Nick Wellnhofer<[email protected]>  wrote:
Well, the compare function can be supplied by the user, and I'd prefer that
we never segfault on bogus user input.

I didn't think we'd exposed the SortUtils routines to users yet, but fair
enough.

VA_Sort uses the object's Compare_To function by default, which can be overridden by users.

How about we throw an exception, then?

     if (i == right) {
         THROW(ERR, "Element failed to test as equal to itself");
     }

Yes, that's even better than to silently ignore the error.

Nick

Reply via email to