You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2015/07/12 22:45:01 UTC

camel git commit: CAMEL-6649: AWS Simple Email Service - add attachment support, removed Print stack trace

Repository: camel
Updated Branches:
  refs/heads/master 8c5ae5b3e -> 71b43bc83


CAMEL-6649: AWS Simple Email Service - add attachment support, removed Print stack trace


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/71b43bc8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/71b43bc8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/71b43bc8

Branch: refs/heads/master
Commit: 71b43bc83c47acab4ceab3f450526297105dee57
Parents: 8c5ae5b
Author: Andrea Cosentino <an...@gmail.com>
Authored: Sun Jul 12 22:42:37 2015 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Sun Jul 12 22:42:37 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/aws/ses/SesProducer.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/71b43bc8/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
index 7944ddb..7c1b6ff 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesProducer.java
@@ -81,7 +81,7 @@ public class SesProducer extends DefaultProducer {
         return request;
     }
     
-    private SendRawEmailRequest createRawMailRequest(Exchange exchange) {
+    private SendRawEmailRequest createRawMailRequest(Exchange exchange) throws Exception {
         SendRawEmailRequest request = new SendRawEmailRequest();
         request.setSource(determineFrom(exchange));
         request.setDestinations(determineRawTo(exchange));
@@ -102,7 +102,7 @@ public class SesProducer extends DefaultProducer {
         return message;
     }
     
-    private com.amazonaws.services.simpleemail.model.RawMessage createRawMessage(Exchange exchange) {
+    private com.amazonaws.services.simpleemail.model.RawMessage createRawMessage(Exchange exchange) throws Exception {
         com.amazonaws.services.simpleemail.model.RawMessage message = new com.amazonaws.services.simpleemail.model.RawMessage();
         javax.mail.Message content = exchange.getIn().getBody(javax.mail.Message.class);
         OutputStream byteOutput = new ByteArrayOutputStream();
@@ -110,7 +110,7 @@ public class SesProducer extends DefaultProducer {
             content.writeTo(byteOutput);
         } catch (Exception e) {
             log.error("Cannot write to byte Array");
-            e.printStackTrace();
+            throw e;
         }
         byte[] messageByteArray = ((ByteArrayOutputStream)byteOutput).toByteArray();
         message.setData(ByteBuffer.wrap(messageByteArray));