forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r477263 - /forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java
Date Mon, 20 Nov 2006 17:26:17 GMT
Author: rgardler
Date: Mon Nov 20 09:26:16 2006
New Revision: 477263

URL: http://svn.apache.org/viewvc?view=rev&rev=477263
Log:
Improve error messages when a source document cannot be found

Modified:
    forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java

Modified: forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java?view=diff&rev=477263&r1=477262&r2=477263
==============================================================================
--- forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java (original)
+++ forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java Mon
Nov 20 09:26:16 2006
@@ -167,14 +167,18 @@
 	 * 
 	 * @param sourceDocuments
 	 * @throws IOException
+	 * @throws ProcessingException 
 	 */
 	private List<InternalDocument> processInputPlugins(
 			final List<AbstractSourceDocument> sourceDocuments)
-			throws IOException {
+			throws IOException, ProcessingException {
 		final List<InternalDocument> results = new ArrayList<InternalDocument>(
 				sourceDocuments.size());
 		for (int i = 0; i < sourceDocuments.size(); i++) {
 			final AbstractSourceDocument doc = sourceDocuments.get(i);
+			if (doc == null) {
+				throw new ProcessingException("No source document is available.");
+			}
 			AbstractInputPlugin plugin = getInputPlugin(doc);
 			results.add((InternalDocument) plugin.process(doc));
 		}



Mime
View raw message