提交 033b798a authored 作者: Thomas Mueller's avatar Thomas Mueller

Remove unused exception handling.

上级 328abb40
...@@ -188,12 +188,12 @@ public class TestUpgrade extends TestBase { ...@@ -188,12 +188,12 @@ public class TestUpgrade extends TestBase {
deleteDb("upgrade"); deleteDb("upgrade");
} }
public void deleteDb(String dbName) throws SQLException { public void deleteDb(String dbName) {
super.deleteDb(dbName); super.deleteDb(dbName);
try { try {
Utils.callStaticMethod("org.h2.upgrade.v1_1.tools.DeleteDbFiles.execute", getBaseDir(), dbName, true); Utils.callStaticMethod("org.h2.upgrade.v1_1.tools.DeleteDbFiles.execute", getBaseDir(), dbName, true);
} catch (Exception e) { } catch (Exception e) {
throw new SQLException(e.getMessage()); throw new RuntimeException(e.getMessage());
} }
IOUtils.delete(getBaseDir() + "/" + dbName + ".data.db.backup"); IOUtils.delete(getBaseDir() + "/" + dbName + ".data.db.backup");
IOUtils.delete(getBaseDir() + "/" + dbName + ".index.db.backup"); IOUtils.delete(getBaseDir() + "/" + dbName + ".index.db.backup");
......
...@@ -99,7 +99,7 @@ public class TestCrashAPI extends TestBase implements Runnable { ...@@ -99,7 +99,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
} }
} }
private static void recoverAll() throws SQLException { private static void recoverAll() {
org.h2.Driver.load(); org.h2.Driver.load();
File[] files = new File("temp/backup").listFiles(); File[] files = new File("temp/backup").listFiles();
Arrays.sort(files, new Comparator<File>() { Arrays.sort(files, new Comparator<File>() {
......
...@@ -53,7 +53,7 @@ public class TestRandomSQL extends TestBase { ...@@ -53,7 +53,7 @@ public class TestRandomSQL extends TestBase {
return getConnection(getDatabaseName()); return getConnection(getDatabaseName());
} }
private void deleteDb() throws SQLException { private void deleteDb() {
String name = getDatabaseName(); String name = getDatabaseName();
if (name.startsWith(FileSystemMemory.PREFIX)) { if (name.startsWith(FileSystemMemory.PREFIX)) {
DeleteDbFiles.execute("memFS:/", name, true); DeleteDbFiles.execute("memFS:/", name, true);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论