From 166a4b291a573d2c9f346a1b1051a2e9b45ff375 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Wed, 16 Oct 2013 09:41:12 -0400
Subject: [PATCH 1/6] Fixed error handling in DoUnrevoke servlet.
The DoUnrevoke servlet has been modified to re-throw the EBaseException
such that the error message can be returned properly to the client.
Ticket #739
---
base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java b/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
index cca8381..2b30720 100644
--- a/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
+++ b/base/common/src/com/netscape/cms/servlet/cert/DoUnrevoke.java
@@ -40,7 +40,6 @@ import com.netscape.certsrv.authorization.AuthzToken;
import com.netscape.certsrv.authorization.EAuthzAccessDenied;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IArgBlock;
-import com.netscape.certsrv.base.PKIException;
import com.netscape.certsrv.ca.ICRLIssuingPoint;
import com.netscape.certsrv.ca.ICertificateAuthority;
import com.netscape.certsrv.dbs.certdb.CertId;
@@ -274,7 +273,7 @@ public class DoUnrevoke extends CMSServlet {
processor.log(ILogger.LL_FAILURE, "Error " + e);
processor.auditChangeRequest(ILogger.FAILURE);
- throw new PKIException(e.getMessage());
+ throw e;
}
// change audit processing from "REQUEST" to "REQUEST_PROCESSED"
@@ -419,6 +418,8 @@ public class DoUnrevoke extends CMSServlet {
} catch (EBaseException e) {
processor.log(ILogger.LL_FAILURE, "Error " + e);
processor.auditChangeRequestProcessed(ILogger.FAILURE);
+
+ throw e;
}
}
--
1.8.3.1