Other Error-Handling Techniques
- Ignore exception
- Typical for personal (not commercial) software
- Program may fail
- Abort program
- Usually appropriate
- Not appropriate for mission-critical software
- Set error indicators
- Unfortunately, may not test for these when necessary
- Test for error condition
- Call exit (
cstdlib
) and pass error code
- setjump and longjump
csetjmp
- Jump from deeply nested function to call error handler
- Can be dangerous
- Dedicated error handling
- new can have a special handler
- Discussed 13.11
2004-12-28