Title: [786] trunk/core/src/java/org/jbehave/core/story: [EK] Oops, we put some stuff in for debugging and forgot to take it out.
Revision
786
Author
sirenian
Date
2007-08-16 07:53:33 -0500 (Thu, 16 Aug 2007)

Log Message

[EK] Oops, we put some stuff in for debugging and forgot to take it out. Also removed the System.exit calls and let the exceptions propagate instead.

Modified Paths

Diff

Modified: trunk/core/src/java/org/jbehave/core/story/StoryPrinter.java (785 => 786)

--- trunk/core/src/java/org/jbehave/core/story/StoryPrinter.java	2007-08-15 17:17:30 UTC (rev 785)
+++ trunk/core/src/java/org/jbehave/core/story/StoryPrinter.java	2007-08-16 12:53:33 UTC (rev 786)
@@ -41,17 +41,12 @@
         story.narrateTo(renderer);
     }
 
-    public static void main(String[] args) {        
-        try {
-            StoryPrinter printer = new StoryPrinter(
-                    new StoryLoader(new TextStoryParser(), StoryPrinter.class.getClassLoader()), 
-                    new PlainTextRenderer(System.out));
-            for (int i = 0; i < args.length; i++) {
-                printer.print(args[i]); 
-            }           
-        } catch (Exception e) {
-            e.printStackTrace();
-            System.exit(1);
-        }
+    public static void main(String[] args) throws MalformedURLException, InstantiationException, IllegalAccessException, ClassNotFoundException {        
+        StoryPrinter printer = new StoryPrinter(
+                new StoryLoader(new TextStoryParser(), StoryPrinter.class.getClassLoader()), 
+                new PlainTextRenderer(System.out));
+        for (int i = 0; i < args.length; i++) {
+            printer.print(args[i]); 
+        }           
     }
 }

Modified: trunk/core/src/java/org/jbehave/core/story/StoryRunner.java (785 => 786)

--- trunk/core/src/java/org/jbehave/core/story/StoryRunner.java	2007-08-15 17:17:30 UTC (rev 785)
+++ trunk/core/src/java/org/jbehave/core/story/StoryRunner.java	2007-08-16 12:53:33 UTC (rev 786)
@@ -69,18 +69,12 @@
         return (Story) classLoader.loadClass(className).newInstance();
     }
     
-    public static void main(String[] args) throws ClassNotFoundException {
-        Thread.currentThread().getContextClassLoader().loadClass("com.sirenian.hellbound.stories.TheGlyphIsConstrainedByThePit");
-        try {
-            StoryRunner runner = new StoryRunner();
-            for (int i = 0; i < args.length; i++) {
-                runner.run(args[i], System.out);
-            }
-            System.exit(runner.succeeded() ? 0 : 1);
-        } catch (Exception e) {
-            e.printStackTrace();
-            System.exit(1);
+    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+        StoryRunner runner = new StoryRunner();
+        for (int i = 0; i < args.length; i++) {
+            runner.run(args[i], System.out);
         }
+        System.exit(runner.succeeded() ? 0 : 1);
     }
 
 

Modified: trunk/core/src/java/org/jbehave/core/story/StoryToDirectoryPrinter.java (785 => 786)

--- trunk/core/src/java/org/jbehave/core/story/StoryToDirectoryPrinter.java	2007-08-15 17:17:30 UTC (rev 785)
+++ trunk/core/src/java/org/jbehave/core/story/StoryToDirectoryPrinter.java	2007-08-16 12:53:33 UTC (rev 786)
@@ -43,21 +43,15 @@
         outputStream.close();
     }
 
-    public static void main(String[] args) throws ClassNotFoundException {
+    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException {
         File directory = new File(args[0]);                      
-        Thread.currentThread().getContextClassLoader().loadClass("com.sirenian.hellbound.stories.TheGlyphIsConstrainedByThePit");
-        
-        try {
-            StoryToDirectoryPrinter printer = new StoryToDirectoryPrinter(
-                    new StoryLoader(new TextStoryParser(), Thread.currentThread().getContextClassLoader()),
-                    directory);
-                    
-            for (int i = 1; i < args.length; i++) {
-                printer.print(args[i]); 
-            }           
-        } catch (Exception e) {
-            e.printStackTrace();
-//            System.exit(1);
-        }
+    
+        StoryToDirectoryPrinter printer = new StoryToDirectoryPrinter(
+                new StoryLoader(new TextStoryParser(), Thread.currentThread().getContextClassLoader()),
+                directory);
+                
+        for (int i = 1; i < args.length; i++) {
+            printer.print(args[i]); 
+        }           
     }
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to