Created
March 9, 2010 18:58
-
-
Save admiyo/326950 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/proxy/src/main/java/org/fedoraproject/candlepin/resource/ConsumerResource | |
| +++ b/proxy/src/main/java/org/fedoraproject/candlepin/resource/ConsumerResource | |
| @@ -157,7 +157,7 @@ public class ConsumerResource { | |
| @POST | |
| @Consumes({ MediaType.APPLICATION_JSON }) | |
| @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) | |
| - public Consumer create(Consumer in) { | |
| + public Consumer create(Consumer in) throws BadRequestException { | |
| // API:registerConsumer | |
| Owner owner = ownerCurator.findAll().get(0); // TODO: actually get cur | |
| Consumer consumer = new Consumer(); | |
| @@ -187,9 +187,8 @@ public class ConsumerResource { | |
| return consumer; | |
| } | |
| - catch (RuntimeException e) { | |
| - log.error("Problem creating consumer!", e); | |
| - | |
| + catch (Exception e) { | |
| + log.error("Problem creating consumer:", e); | |
| throw new BadRequestException(e.getMessage()); | |
| } | |
| } | |
| diff --git a/proxy/src/main/java/org/fedoraproject/candlepin/service/IdentityCe | |
| index b1c3fab..b63956c 100644 | |
| --- a/proxy/src/main/java/org/fedoraproject/candlepin/service/IdentityCertServi | |
| +++ b/proxy/src/main/java/org/fedoraproject/candlepin/service/IdentityCertServi | |
| @@ -15,6 +15,9 @@ | |
| package org.fedoraproject.candlepin.service; | |
| +import java.io.IOException; | |
| +import java.security.GeneralSecurityException; | |
| + | |
| import org.fedoraproject.candlepin.model.Consumer; | |
| import org.fedoraproject.candlepin.model.ConsumerIdentityCertificate; | |
| @@ -28,6 +31,8 @@ public interface IdentityCertServiceAdapter { | |
| * all future communication between Candlepin and the consumer. | |
| * @param consumer Consumer. | |
| * @return consumer's identity certificate. | |
| + * @throws IOException | |
| + * @throws GeneralSecurityException | |
| */ | |
| - ConsumerIdentityCertificate generateIdentityCert(Consumer consumer); | |
| + ConsumerIdentityCertificate generateIdentityCert(Consumer consumer) throws | |
| } | |
| \ No newline at end of file | |
| (END) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment