|
From: SVN by r. <sv...@ca...> - 2009-01-15 20:10:01
|
Author: roy
Date: 2009-01-15 21:09:47 +0100 (Thu, 15 Jan 2009)
New Revision: 347
Modified:
src/main/java/nl/improved/sqlclient/SQLShell.java
Log:
print errors after quit
Modified: src/main/java/nl/improved/sqlclient/SQLShell.java
===================================================================
--- src/main/java/nl/improved/sqlclient/SQLShell.java 2009-01-15 20:09:29 UTC (rev 346)
+++ src/main/java/nl/improved/sqlclient/SQLShell.java 2009-01-15 20:09:47 UTC (rev 347)
@@ -20,6 +20,7 @@
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
+import java.io.PrintStream;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
@@ -36,6 +37,8 @@
public class SQLShell {
public static void main(String[] args) throws InterruptedException, IOException {
+ PrintStream errorStream = System.err;
+ PrintStream outStream = System.out;
Map<String, String> argsMap = new HashMap<String, String>();
if (args.length > 0) {
if (args[0].equals("--help") || args.length %2 == 1) {
@@ -112,6 +115,8 @@
}
}
sqlshellWindow.show();
+ System.setErr(errorStream);
+ System.setOut(outStream);
File errFile = sqlshellWindow.getErrFile();
if (errFile != null && errFile.length() > 0L) {
System.out.println("There where errors during execution of sqlshell:");
|