Add generic exception handling process that save exception context,
jump to the corresponding vector handler, restore exception context
again. There is still a bug to be solved for this function that
affects _timer exception and prevent it from working properly.