<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/txt_machine/errors.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,5 @@
 %w(
+  errors
   base
   message
   gateways/skeleton</diff>
      <filename>lib/txt_machine.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,20 +22,22 @@ module TxtMachine
         path += '?' + message_to_hash(msg).map { |k,v| &quot;#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}&quot;}.join('&amp;')
       
         begin
+          
           req = Net::HTTP::Post.new(path)
           http = Net::HTTP.new(ENDURI.host, ENDURI.port)
           http.use_ssl = true
           http.verify_mode = OpenSSL::SSL::VERIFY_NONE
           res = http.start { |http| http.request(req) }
-        rescue =&gt; e
-          
-        end
         
-        case res
-        when Net::HTTPSuccess
-          # OK
-        else
-          # error
+          case res
+          when Net::HTTPSuccess
+            # OK
+          else
+            res.error!
+          end
+        
+        rescue StandardError =&gt; e
+          raise SendFailedError.new(:wrapped_exception =&gt; e)
         end
       
       end</diff>
      <filename>lib/txt_machine/gateways/itagg.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>97e72670192df02db1d07e8d1d346f92e6f63e90</id>
    </parent>
  </parents>
  <author>
    <name>Jason Frame</name>
    <email>jason@magiclamp.co.uk</email>
  </author>
  <url>http://github.com/jaz303/txt_machine/commit/48a4ebb8c1c1ce6ce978c88591cf29817281e1ed</url>
  <id>48a4ebb8c1c1ce6ce978c88591cf29817281e1ed</id>
  <committed-date>2009-06-02T17:41:47-07:00</committed-date>
  <authored-date>2009-06-02T17:41:47-07:00</authored-date>
  <message>tidied up error handling</message>
  <tree>76cc78e038c4f7f792fb5ea9de497343d3d51ab3</tree>
  <committer>
    <name>Jason Frame</name>
    <email>jason@magiclamp.co.uk</email>
  </committer>
</commit>
