You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/03/02 15:37:26 UTC

svn commit: r918055 - /camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java

Author: davsclaus
Date: Tue Mar  2 14:37:26 2010
New Revision: 918055

URL: http://svn.apache.org/viewvc?rev=918055&view=rev
Log:
CAMEL-2515: Printing exception on system err if error starting Camel.

Modified:
    camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java

Modified: camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java?rev=918055&r1=918054&r2=918055&view=diff
==============================================================================
--- camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java (original)
+++ camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/RunMojo.java Tue Mar  2 14:37:26 2010
@@ -385,7 +385,7 @@
         
         if (usingSpringJavaConfigureMain) {
             mainClass = "org.apache.camel.spring.javaconfig.Main";
-            getLog().info("Using the org.apache.camel.spring.javaconfig.Main to initate a camel context");
+            getLog().info("Using the org.apache.camel.spring.javaconfig.Main to initiate a CamelContext");
         }
         
         if (getLog().isDebugEnabled()) {
@@ -414,6 +414,11 @@
                     }
                     main.invoke(main, new Object[] {arguments});
                 } catch (Exception e) { // just pass it on
+                    // let it be printed so end users can see the exception on the console
+                    System.err.println("*************************************");
+                    System.err.println("Error occurred while running main from: " + mainClass);
+                    e.printStackTrace();
+                    System.err.println("*************************************");
                     Thread.currentThread().getThreadGroup().uncaughtException(Thread.currentThread(), e);
                 }
             }