This is the code where individual extractors are loaded and configured.
ConfigurationException from extractor.configure() method calls were
caught by the catch(Exception e) clause, which meant the information
that the extractor threw about the misconfiguration got lost. For
instance SimpleXmlExtractor throws a ConfigurationException detailing
that the configured xpath was wrong. That information could never reach
the logs. Now it does.
--
Unico
Oliver Zeigermann wrote:
What is that good for?
Oliver
[EMAIL PROTECTED] wrote:
unico 2004/07/09 06:04:36
Modified: src/share/org/apache/slide/extractor
ExtractorManager.java
Log:
catch and rethrow ConfigurationException
Revision Changes Path
1.3 +8 -6
jakarta-slide/src/share/org/apache/slide/extractor/ExtractorManager.java
Index: ExtractorManager.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/extractor/ExtractorManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ExtractorManager.java 5 Jun 2004 12:20:19 -0000 1.2
+++ ExtractorManager.java 9 Jul 2004 13:04:36 -0000 1.3
@@ -52,7 +52,7 @@
extractors.add(extractor);
}
- public PropertyExtractor
[]getPropertyExtractors(NodeRevisionDescriptors descriptors,
NodeRevisionDescriptor descriptor) {
+ public PropertyExtractor[]
getPropertyExtractors(NodeRevisionDescriptors descriptors,
NodeRevisionDescriptor descriptor) {
List matchingExtractors = new ArrayList();
for ( Iterator i = extractors.iterator(); i.hasNext(); ) {
Extractor extractor = (Extractor)i.next();
@@ -64,7 +64,7 @@
return (PropertyExtractor
[])matchingExtractors.toArray(extractors);
};
- public ContentExtractor
[]getContentExtractors(NodeRevisionDescriptors descriptors,
NodeRevisionDescriptor descriptor) {
+ public ContentExtractor[]
getContentExtractors(NodeRevisionDescriptors descriptors,
NodeRevisionDescriptor descriptor) {
List matchingExtractors = new ArrayList();
for ( Iterator i = extractors.iterator(); i.hasNext(); ) {
Extractor extractor = (Extractor)i.next();
@@ -76,7 +76,7 @@
return (ContentExtractor
[])matchingExtractors.toArray(extractors);
};
- public Extractor []getExtractors(NodeRevisionDescriptors
descriptors, NodeRevisionDescriptor descriptor) {
+ public Extractor[] getExtractors(NodeRevisionDescriptors
descriptors, NodeRevisionDescriptor descriptor) {
List matchingExtractors = new ArrayList();
for ( Iterator i = extractors.iterator(); i.hasNext(); ) {
Extractor extractor = (Extractor)i.next();
@@ -117,6 +117,8 @@
addExtractor(extractor);
} catch (ClassCastException e) {
throw new ConfigurationException("Extractor
'"+classname+"' is not of type Extractor", config);
+ } catch (ConfigurationException e) {
+ throw e;
} catch (Exception e) {
throw new ConfigurationException("Extractor
'"+classname+"' could not be loaded", config);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]