diff --git a/source/org/thdl/tib/scanner/RemoteScannerFilter.java b/source/org/thdl/tib/scanner/RemoteScannerFilter.java index 733d8ec..33388f0 100644 --- a/source/org/thdl/tib/scanner/RemoteScannerFilter.java +++ b/source/org/thdl/tib/scanner/RemoteScannerFilter.java @@ -73,7 +73,7 @@ public class RemoteScannerFilter extends GenericServlet { // do nothing } - String linea, dicts = req.getParameter("dicts"), dicDescrip[], jwf = req.getParameter("jwf"), tag; + String linea = null, dicts = req.getParameter("dicts"), dicDescrip[], jwf = req.getParameter("jwf"), tag; Definitions defs; ByteDictionarySource dict_source; if (jwf!=null) format = JSON; @@ -132,9 +132,9 @@ public class RemoteScannerFilter extends GenericServlet { out.println(jwf + "({\"words\":{"); } + scanner.clearTokens(); try { - scanner.clearTokens(); switch (format) { case INTERNAL: @@ -154,35 +154,48 @@ public class RemoteScannerFilter extends GenericServlet scanner.scanLine(linea); } } - scanner.finishUp(); + } + catch (Exception e) + { + if (linea!=null) sl.writeLog("1\t2\t" + linea); + sl.writeException(e); + } + scanner.finishUp(); + try + { words = scanner.getWordArray(); if (words!=null) { for (i=0; i