Catch Segmentation fault in c++

前端 未结 6 1185
半阙折子戏
半阙折子戏 2020-12-09 16:42

Does a try-catch block catch segmentation fault errors?

I am reading a text file using the function given below but sometimes the file is empty and the

6条回答
  •  Happy的楠姐
    2020-12-09 17:31

    C++ try-catch blocks only handle C++ exceptions. Errors like segmentation faults are lower-level, and try-catch ignores these events and behaves the same as if there was no try-catch block.

提交回复
热议问题