[api] catch exceptions in package#rdiff