perfsonar-dev - perfsonar: r2671 - trunk/perfsonar/src/org/perfsonar/service/commons/authn
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: perfsonar: r2671 - trunk/perfsonar/src/org/perfsonar/service/commons/authn
- Date: Thu, 16 Aug 2007 11:06:13 -0400
Author: rodriguez
Date: 2007-08-16 11:06:12 -0400 (Thu, 16 Aug 2007)
New Revision: 2671
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
Log:
Better code in exceptions
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-08-16 14:10:42 UTC (rev 2670)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-08-16 15:06:12 UTC (rev 2671)
@@ -1,6 +1,7 @@
package org.perfsonar.service.commons.authn;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.StringWriter;
import java.net.URL;
import java.util.Iterator;
@@ -78,7 +79,7 @@
this.saxParser=saxParser;
}
- public AuthNResponse getAuthentication(AuthNRequest req) {
+ public AuthNResponse getAuthentication(AuthNRequest req) throws
PerfSONARException {
AuthNResponse resp=new AuthNResponse();
StringWriter outWriter = null;
// prepare to call - set service elements
@@ -147,10 +148,19 @@
} catch (ClassCastException e) {
e.printStackTrace();
-
System.out.println("AADispatchSOAPProtocol.getAuthentication: We didn't get a
Vector of SOAPBodyElements!");
+ String m = "AADispatchSOAPProtocol.getAuthentication:
We didn't get a Vector of SOAPBodyElements!";
+ System.out.println(m);
+ throw new PerfSONARException("error.as.body",m);
+ } catch (FileNotFoundException e2) {
+ e2.printStackTrace();
+ String m = "AADispatchSOAPProtocol.getAuthentication:
Authentication request file not found";
+ System.out.println(m);
+ throw new PerfSONARException("error.as.query",m);
} catch (Exception e) {
-
System.out.println("AADispatchSOAPProtocol.getAuthentication: General
exception while retrieving report");
e.printStackTrace();
+ String m="AADispatchSOAPProtocol.getAuthentication:
General exception while retrieving report";
+ System.out.println(m);
+ throw new PerfSONARException("error.as.query",m);
}
return resp;
- perfsonar: r2671 - trunk/perfsonar/src/org/perfsonar/service/commons/authn, svnlog, 08/16/2007
Archive powered by MHonArc 2.6.16.