提交 c9131d7d authored 作者: Thomas Mueller's avatar Thomas Mueller

The Shell tool now prints the stack trace when the list mode is enabled.

上级 359d5e5b
...@@ -139,7 +139,7 @@ public class Shell extends Tool implements Runnable { ...@@ -139,7 +139,7 @@ public class Shell extends Tool implements Runnable {
private void showHelp() { private void showHelp() {
println("Commands are case insensitive; SQL statements end with ';'"); println("Commands are case insensitive; SQL statements end with ';'");
println("help or ? Display this help"); println("help or ? Display this help");
println("list Toggle result list mode"); println("list Toggle result list / stack trace mode");
println("maxwidth Set maximum column width (default is 100)"); println("maxwidth Set maximum column width (default is 100)");
println("show List all tables"); println("show List all tables");
println("describe Describe a table"); println("describe Describe a table");
...@@ -454,6 +454,9 @@ public class Shell extends Tool implements Runnable { ...@@ -454,6 +454,9 @@ public class Shell extends Tool implements Runnable {
result = stat.execute(sql); result = stat.execute(sql);
} catch (SQLException e) { } catch (SQLException e) {
println("Error: " + e.toString()); println("Error: " + e.toString());
if (listMode) {
e.printStackTrace(err);
}
return; return;
} }
ResultSet rs = null; ResultSet rs = null;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论