c++ - Checking program for crashes -
i writing program unit testing via cute library , have function needs checked if program crashes when calling it.
i'v tried try-catch
block :
try { myfunc(); } catch(...) { }
but handles exceptions , of no use when no exception called (i.e. abort()
).
there way check if there crash resp. informing me crash happened (line number, ...)?
by handling sigabrt. or maybe register handler via atexit functions (see c++ abort override)
Comments
Post a Comment