b.unlink(); // keep the file only in case of failure
}
} catch (IOException ex) {
throw new HgIOException(ex.getMessage(), null); // XXX not a nice idea to throw IOException from BundleGenerator#create
} catch (HgRepositoryNotFoundException ex) {
final HgInvalidStateException e = new HgInvalidStateException("Failed to load a just-created bundle");
e.initCause(ex);
throw new HgLibraryFailureException(e);
} catch (HgRuntimeException ex) {
throw new HgLibraryFailureException(ex);
} finally {
progress.done();