Does a try-catch block catch segmentation fault errors?
try-catch
I am reading a text file using the function given below but sometimes the file is empty and the
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.