Hi, I have one simple question about exceptions, that I still dont understand much...
For example: in my app, I use RichEditCtrlView as main view. Sometimes, when I call GetRichEditCtrl().GetTextLength(), program crashes (access violation). I ran it in debugger and, after the crash, I looked at call stack window. The last step in the sequence was somewhere in afx headers, in definition of GetTextLength. There was:
Hmm...I know what it means, but I dont understand one thing:
If I would put the code in my app to try block and catch (...) every exception, is it good ?? Will it help before these access violation erors ?
I know that to exception can be handled, SOMETHING must THROW the exception. But I dont understand one thing:
If I want to be protected aginst access violations and similar errors caused by wrong memory access, what can I do ? Do some functions inside Windows throw exceptions when something is bad ? Will it have effect if I put try block around ?
Maybe my questions are little bit confusing, but I hope you will understand it...
Thanks in advance for anything.