Some small things like, reorganizing imports, accessing static variables
[mir.git] / source / mir / servlet / ServletModule.java
index c49a087..eb95f61 100755 (executable)
@@ -54,8 +54,6 @@ import mir.misc.LineFilterWriter;
 import mir.module.AbstractModule;\r
 import mir.module.ModuleException;\r
 import mir.storage.StorageObject;\r
-import mir.storage.StorageObjectFailure;\r
-\r
 import mir.util.*;\r
 \r
 \r
@@ -88,8 +86,9 @@ public abstract class ServletModule {
   public ServletModule(){\r
     try {\r
       configuration = MirPropertiesConfiguration.instance();\r
-    } catch (PropertiesConfigExc e) {\r
-      e.printStackTrace(System.err);\r
+    }\r
+    catch (PropertiesConfigExc e) {\r
+      throw new RuntimeException("Can't get configuration: " + e.getMessage());\r
     }\r
   }\r
 \r
@@ -478,7 +477,7 @@ public abstract class ServletModule {
       for (int i = 0; i < theFieldList.size(); i++) {\r
         aField = (String) theFieldList.get(i);\r
 \r
-        System.out.println("field " + aField + " = " + parser.getParameter(aField));\r
+        logger.debug("field " + aField + " = " + parser.getParameter(aField));\r
 \r
         aValue = parser.getParameter(aField);\r
         if (aValue != null)\r
@@ -487,7 +486,7 @@ public abstract class ServletModule {
       return withValues;\r
     }\r
     catch (Throwable e) {\r
-      e.printStackTrace(System.out);\r
+      e.printStackTrace(logger.asPrintWriter(LoggerWrapper.DEBUG_MESSAGE));\r
       throw new ServletModuleException(\r
           "ServletModule.getIntersectingValues: " + e.getMessage());\r
     }\r