if you know a particular process or system callmakes errors,then you run code that checks for that error,or exception,or preempively hooks a problematic system call,to redirect to "your"code that handles the state of exception,and returns.

https://en.wikipedia.org/wiki/Interrupt#Terminology