                 }
             }
             
-            self.taskResult = handler(self.responseData, self.urlResponse)
+            do {
+                self.taskResult = try handler(self.responseData, self.urlResponse)
+            } catch let error {
+                self.taskResult = .Failure(error)
+            }
         }
 
         return self


extension ServiceTask {
    /// A closure type alias for handling the response as JSON.
    public typealias JSONHandler = (AnyObject, NSURLResponse?) -> ServiceTaskResult
    
    /**
     Add a response handler to serialize the response body as a JSON object. The

 via the `state` property.
*/
@objc public final class ServiceTask: NSObject {
    public typealias ResponseProcessingHandler = (NSData?, NSURLResponse?) throws -> ServiceTaskResult
    
    /// A closure type alias for a success handler.
    public typealias UpdateUIHandler = (Any?) -> Void
