Add user helpers save_err and restore_err (XCC)