incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1125703 - /incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
Date Sat, 21 May 2011 13:57:18 GMT
Author: rmatthews
Date: Sat May 21 13:57:18 2011
New Revision: 1125703

URL: http://svn.apache.org/viewvc?rev=1125703&view=rev
Log:
Create directory for error files if none already exists.

Modified:
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java?rev=1125703&r1=1125702&r2=1125703&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
Sat May 21 13:57:18 2011
@@ -265,7 +265,11 @@ public class Dispatcher {
         try {
             final String directory =
                 IsisContext.getConfiguration().getString(ConfigurationConstants.ROOT + "scimpi.error-snapshots",
".");
-            writer = new PrintWriter(new File(directory, "error_" + errorRef + ".html"));
+            File dir = new File(directory);
+            if (!dir.exists()) {
+                dir.mkdirs();
+            }
+            writer = new PrintWriter(new File(dir, "error_" + errorRef + ".html"));
             final DebugWriter writer2 = new DebugWriter(writer, true);
             writer2.concat(debugHtml);
             writer2.close();



Mime
View raw message