General information
Category:
Coding, syntax & commands
>An error handler could do this as well, however it would be a more complex error handler.
Hey, it's just code, right? :) Seriously, I think this would be a great thing to write. You wouldn't have to make any assumptions then about what kind of bugs you expect the user to encounter. It would slow things down, though.
>> In my mind the essential difference is that asserts are for giving information to developers and error handlers are for preventing data loss.<<
If no one puts checks in ASSERTs that, without the ASSERT, could not produce data loss, then I think this makes sense.
I see that sentence contains a few too many negatives. Let me rephrase: If a condition could produce data loss, it should not rely on ASSERT to catch it.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only