20
Jan/080
Jan/080
Handling Error Flow
Handling your applications error flow can be hard to manage. I’ll go through some common tips on what your application should do when problem occurs and how to track your error flow.
What your application should do :
- On warning, possible note to user but don’t kill the application.
- On error, return cleanly.
- On should not never happen -> assert.
To boost tracking :
- Log (e.g. log.txt).
- For each message print the filename and the line number where it happen.
- Message Box
- In Visual Studio you can write to debug output window (OutputDebugString – function)
- Printf – if you have a console.
I usually go for using log and output to debug window. For critical errors I use message box as an extra.
Enjoy this article?
Comments (0)
Trackbacks (0) ( subscribe to comments on this post )
No comments yet.
Leave a comment
No trackbacks yet.