Author: antonio
Date: Sun May 1 09:55:08 2005
New Revision: 165524
URL: http://svn.apache.org/viewcvs?rev=165524&view=rev
Log:
Use SystemUtils
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap/HandleErrorsNode.java
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap/HandleErrorsNode.java
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap/HandleErrorsNode.java?rev=165524&r1=165523&r2=165524&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap/HandleErrorsNode.java
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/sitemap/HandleErrorsNode.java
Sun May 1 09:55:08 2005
@@ -24,6 +24,7 @@
import org.apache.cocoon.components.treeprocessor.InvokeContext;
import org.apache.cocoon.components.treeprocessor.ProcessingNode;
import org.apache.cocoon.environment.Environment;
+import org.apache.commons.lang.SystemUtils;
/**
* Handles <map:handle-errors>
@@ -94,14 +95,13 @@
env.getObjectModel().remove(Constants.NOTIFYING_OBJECT);
throw new ProcessingException(
"Incomplete pipeline: 'handle-error' without a 'type'
must include a generator, at " +
- getLocation() + System.getProperty("line.separator") +
+ getLocation() + SystemUtils.LINE_SEPARATOR +
"Either add a generator (preferred) or a type='500'
attribute (deprecated) on 'handle-errors'");
}
// Rethrow the exception
throw e;
}
-
} else {
// A 'type' attribute is present : add the implicit
generator
context.getProcessingPipeline().setGenerator("<notifier>", "",
Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
@@ -114,10 +114,9 @@
env.getObjectModel().remove(Constants.NOTIFYING_OBJECT);
throw new ProcessingException(
"Error: 'handle-error' with a 'type' attribute has
an implicit generator, at " +
- getLocation() +
System.getProperty("line.separator") +
+ getLocation() + SystemUtils.LINE_SEPARATOR +
"Please remove the 'type' attribute on
'handle-error'");
}
-
// Rethrow the exception
throw e;
}