Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is ASSERT used for?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00141677
Message ID:
00142088
Views:
34
>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
Map
View

Click here to load this message in the networking platform