*) IndexImport_p.java: Print out stacktrace on error

See: http://www.yacy-forum.de/viewtopic.php?p=15233

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1349 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent b4ed5eba2f
commit b9db08249f

@ -18,6 +18,9 @@
<p><font color="red"><b>#[error_msg]#</b></font></p>
::<!-- 2 -->
<p><font color="red"><b>Import Job with the same path already started.</b></font></p>
::<!-- 3 -->
<p><font color="red"><b>#[error_msg]#</b></font></p>
<p><font color="red"><code>#[error_stackTrace]#</code></font></p>
#(/error)#
<h3>Starting new Job</h3>
<form action="IndexImport_p.html" method="post" enctype="multipart/form-data">

@ -49,12 +49,14 @@
//if the shell's current path is HTROOT
import java.io.File;
import java.io.PrintStream;
import java.util.Date;
import java.util.Vector;
import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaDbImporter;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverByteBuffer;
import de.anomic.server.serverDate;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
@ -93,10 +95,17 @@ public final class IndexImport_p {
prop.put("LOCATION","");
return prop;
}
} catch (Exception e) {
prop.put("error",1);
}
} catch (Exception e) {
serverByteBuffer errorMsg = new serverByteBuffer(100);
PrintStream errorOut = new PrintStream(errorMsg);
e.printStackTrace(errorOut);
prop.put("error",3);
prop.put("error_error_msg",e.toString());
prop.put("error_error_stackTrace",errorMsg.toString().replaceAll("\n","<br>"));
errorOut.close();
}
} else if (post.containsKey("clearFinishedJobList")) {
plasmaDbImporter.finishedJobs.clear();

Loading…
Cancel
Save