Is there any way to ignore signal 9 and 17 (SIGTERM and SIGSTOP) in a program?

If not is it possible for the program to log this signals before exiting ?

All help appreciated.