Modify the exception capturer

Signed-off-by: Connor Yan <126ium@gmail.com>