Skip to Content.
Sympa Menu

perfsonar-dev - r1927 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig

Subject: perfsonar development work

List archive

r1927 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig


Chronological Thread 
  • From:
  • To:
  • Subject: r1927 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig
  • Date: Wed, 17 Jan 2007 06:27:16 -0500

Author: roman
Date: 2007-01-17 06:27:15 -0500 (Wed, 17 Jan 2007)
New Revision: 1927

Modified:

trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
Log:
Catching exceptions when the request has wrong format (for example if
nmwg:subject is empty) has been improved.

Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-01-16 17:38:22 UTC (rev 1926)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-01-17 11:27:15 UTC (rev 1927)
@@ -15,6 +15,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;

import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.exceptions.RequestException;

import org.ggf.ns.nmwg.base.v2_0.Element;
@@ -142,8 +143,32 @@
// genarate correct metadata query
MetadataQueryGenerator metadataQueryGenerator =

MetadataQueryGeneratorFactory.getMetadataQueryGenerator(eventType);
- String mq = metadataQueryGenerator.getMetadataQuery(query);

+ String mq = "";
+ try {
+
+ mq = metadataQueryGenerator.getMetadataQuery(query);
+
+ } catch (PerfSONARException pex) {
+
+ throw new SystemException(pex.getResultCode(),
pex.getMessage());
+
+ } catch (Exception ex) {
+
+ logger.error("Transformations.getMetadataQuery: "
+ + "Unable to generate xquery statement "
+ + "for the metadata configuration "
+ + "from the request metadata. "
+ + ex.toString());
+ throw new RequestException(
+ "error.ma.query",
+ "Unable to generate xquery statement "
+ + "for the metadata configuration "
+ + "from the request metadata. "
+ + ex.toString());
+
+ }
+
return mq;

}



  • r1927 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig, svnlog, 01/17/2007

Archive powered by MHonArc 2.6.16.

Top of Page