You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2008/11/01 15:35:02 UTC
svn commit: r709700 -
/maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
Author: vsiveton
Date: Sat Nov 1 07:35:01 2008
New Revision: 709700
URL: http://svn.apache.org/viewvc?rev=709700&view=rev
Log:
o improved exception due to r709699
Modified:
maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
Modified: maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java?rev=709700&r1=709699&r2=709700&view=diff
==============================================================================
--- maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java (original)
+++ maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java Sat Nov 1 07:35:01 2008
@@ -37,6 +37,7 @@
import org.apache.maven.doxia.linkcheck.DefaultLinkCheck;
import org.apache.maven.doxia.linkcheck.HttpBean;
import org.apache.maven.doxia.linkcheck.LinkCheck;
+import org.apache.maven.doxia.linkcheck.LinkCheckException;
import org.apache.maven.doxia.linkcheck.model.LinkcheckFile;
import org.apache.maven.doxia.linkcheck.model.LinkcheckFileResult;
import org.apache.maven.doxia.linkcheck.model.LinkcheckModel;
@@ -392,9 +393,17 @@
generateReport( locale, result );
}
+ catch ( SiteToolException e )
+ {
+ throw new MavenReportException( "SiteToolException: " + e.getMessage(), e );
+ }
+ catch ( LinkCheckException e )
+ {
+ throw new MavenReportException( "LinkCheckException: " + e.getMessage(), e );
+ }
catch ( Exception e )
{
- throw new MavenReportException( "IOException: " + e.getMessage(), e );
+ throw new MavenReportException( "Exception: " + e.getMessage(), e );
}
}
@@ -404,9 +413,12 @@
/**
* Execute the <code>Linkcheck</code> tool.
+ *
+ * @throws SiteToolException if any
+ * @throws LinkCheckException if any
*/
private LinkcheckModel executeLinkCheck( Locale locale )
- throws Exception
+ throws SiteToolException, LinkCheckException
{
// Wrap linkcheck
LinkCheck lc = new DefaultLinkCheck();
@@ -438,7 +450,7 @@
}
private String[] getExcludedLinks( Locale locale )
- throws Exception
+ throws SiteToolException
{
List linksToExclude = ( excludedLinks != null ? new ArrayList( Arrays.asList( excludedLinks ) ) : new ArrayList() );