comparison src/org/tmatesoft/hg/repo/HgBundle.java @ 427:31a89587eb04

FIXMEs: consistent names, throws for commands and their handlers. Use of checked exceptions in hi-level api
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 29 Mar 2012 17:14:35 +0200
parents 9c9c442b5f2e
children 51d682cf9cdc
comparison
equal deleted inserted replaced
426:063b0663495a 427:31a89587eb04
17 package org.tmatesoft.hg.repo; 17 package org.tmatesoft.hg.repo;
18 18
19 import java.io.File; 19 import java.io.File;
20 import java.io.IOException; 20 import java.io.IOException;
21 21
22 import org.tmatesoft.hg.core.HgBadArgumentException;
23 import org.tmatesoft.hg.core.Nodeid; 22 import org.tmatesoft.hg.core.Nodeid;
24 import org.tmatesoft.hg.core.SessionContext; 23 import org.tmatesoft.hg.core.SessionContext;
25 import org.tmatesoft.hg.internal.ByteArrayChannel; 24 import org.tmatesoft.hg.internal.ByteArrayChannel;
26 import org.tmatesoft.hg.internal.ByteArrayDataAccess; 25 import org.tmatesoft.hg.internal.ByteArrayDataAccess;
27 import org.tmatesoft.hg.internal.DataAccess; 26 import org.tmatesoft.hg.internal.DataAccess;
168 prevRevContent = csetDataAccess.reset(); 167 prevRevContent = csetDataAccess.reset();
169 } catch (CancelledException ex) { 168 } catch (CancelledException ex) {
170 return false; 169 return false;
171 } catch (IOException ex) { 170 } catch (IOException ex) {
172 throw new HgInvalidFileException("Invalid bundle file", ex, bundleFile); // TODO post-1.0 revisit exception handling 171 throw new HgInvalidFileException("Invalid bundle file", ex, bundleFile); // TODO post-1.0 revisit exception handling
173 } catch (HgBadArgumentException ex) { 172 } catch (HgInvalidDataFormatException ex) {
174 throw new HgInvalidControlFileException("Invalid bundle file", ex, bundleFile); 173 throw new HgInvalidControlFileException("Invalid bundle file", ex, bundleFile);
175 } 174 }
176 return true; 175 return true;
177 } 176 }
178 177