You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2014/07/08 23:53:56 UTC
svn commit: r1608961 - in
/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki: PageManager.java
WikiEngine.java
Author: juanpablo
Date: Tue Jul 8 21:53:56 2014
New Revision: 1608961
URL: http://svn.apache.org/r1608961
Log:
add original exception message when rethrowing exceptions
Modified:
jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/PageManager.java
jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java
Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/PageManager.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/PageManager.java?rev=1608961&r1=1608960&r2=1608961&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/PageManager.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/PageManager.java Tue Jul 8 21:53:56 2014
@@ -189,14 +189,14 @@ public class PageManager extends ModuleM
log.debug("Initializing page provider class " + m_provider);
m_provider.initialize(m_engine, props);
} catch (ClassNotFoundException e) {
- log.error("Unable to locate provider class '" + classname + "'", e);
- throw new WikiException("No provider class.", e);
+ log.error("Unable to locate provider class '" + classname + "' (" + e.getMessage() + ")", e);
+ throw new WikiException("No provider class. (" + e.getMessage() + ")", e);
} catch (InstantiationException e) {
- log.error("Unable to create provider class '" + classname + "'", e);
- throw new WikiException("Faulty provider class.", e);
+ log.error("Unable to create provider class '" + classname + "' (" + e.getMessage() + ")", e);
+ throw new WikiException("Faulty provider class. (" + e.getMessage() + ")", e);
} catch (IllegalAccessException e) {
- log.error("Illegal access to provider class '" + classname + "'", e);
- throw new WikiException("Illegal provider class.", e);
+ log.error("Illegal access to provider class '" + classname + "' (" + e.getMessage() + ")", e);
+ throw new WikiException("Illegal provider class. (" + e.getMessage() + ")", e);
} catch (NoRequiredPropertyException e) {
log.error("Provider did not found a property it was looking for: " + e.getMessage(), e);
throw e; // Same exception works.
Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java?rev=1608961&r1=1608960&r2=1608961&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java Tue Jul 8 21:53:56 2014
@@ -633,28 +633,29 @@ public class WikiEngine
{
// RuntimeExceptions may occur here, even if they shouldn't.
log.fatal( "Failed to start managers.", e );
- throw new WikiException( "Failed to start managers: "+e.getMessage(), e );
+ throw new WikiException( "Failed to start managers: " + e.getMessage(), e );
}
catch (ClassNotFoundException e)
{
- log.fatal( "JSPWiki could not start, URLConstructor was not found: ",e );
+ log.fatal( "JSPWiki could not start, URLConstructor was not found: " + e.getMessage(), e );
throw new WikiException(e.getMessage(), e );
}
catch (InstantiationException e)
{
- log.fatal( "JSPWiki could not start, URLConstructor could not be instantiated: ",e );
+ log.fatal( "JSPWiki could not start, URLConstructor could not be instantiated: " + e.getMessage(), e );
throw new WikiException(e.getMessage(), e );
}
catch (IllegalAccessException e)
{
- log.fatal( "JSPWiki could not start, URLConstructor cannot be accessed: ",e );
+ log.fatal( "JSPWiki could not start, URLConstructor cannot be accessed: " + e.getMessage(), e );
throw new WikiException(e.getMessage(), e );
}
catch( Exception e )
{
// Final catch-all for everything
log.fatal( "JSPWiki could not start, due to an unknown exception when starting.",e );
- throw new WikiException("Failed to start; please check log files for better information.", e );
+ throw new WikiException( "Failed to start. Caused by: " + e.getMessage() +
+ "; please check log files for better information.", e );
}
//