*) 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> <p><font color="red"><b>#[error_msg]#</b></font></p>
::<!-- 2 --> ::<!-- 2 -->
<p><font color="red"><b>Import Job with the same path already started.</b></font></p> <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)# #(/error)#
<h3>Starting new Job</h3> <h3>Starting new Job</h3>
<form action="IndexImport_p.html" method="post" enctype="multipart/form-data"> <form action="IndexImport_p.html" method="post" enctype="multipart/form-data">

@ -49,12 +49,14 @@
//if the shell's current path is HTROOT //if the shell's current path is HTROOT
import java.io.File; import java.io.File;
import java.io.PrintStream;
import java.util.Date; import java.util.Date;
import java.util.Vector; import java.util.Vector;
import de.anomic.http.httpHeader; import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaDbImporter; import de.anomic.plasma.plasmaDbImporter;
import de.anomic.plasma.plasmaSwitchboard; import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverByteBuffer;
import de.anomic.server.serverDate; import de.anomic.server.serverDate;
import de.anomic.server.serverObjects; import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch; import de.anomic.server.serverSwitch;
@ -95,8 +97,15 @@ public final class IndexImport_p {
return prop; return prop;
} }
} catch (Exception e) { } catch (Exception e) {
prop.put("error",1); 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_msg",e.toString());
prop.put("error_error_stackTrace",errorMsg.toString().replaceAll("\n","<br>"));
errorOut.close();
} }
} else if (post.containsKey("clearFinishedJobList")) { } else if (post.containsKey("clearFinishedJobList")) {
plasmaDbImporter.finishedJobs.clear(); plasmaDbImporter.finishedJobs.clear();

Loading…
Cancel
Save