I have several Fortran codes to run and sometimes I get an exception (segmentation fault for example):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
This is not a big deal because a correction is possible. However, it stops the flow of the other execution with:
Backtrace for this error:
waiting at this time. With automatic testing, I do not care at this point about the backtrace and just want to display an error and I will come back to it later.
How can I prevent the program printing the backtrace for the error so that it just returns a value like 42?
I use gfortran 4.9.2.