             return
         }
         
-        self.error = err
+        self.result = .error(err)
         
         lockQueue.sync {
             self.errorBlock?(err)

    public var isComplete: Bool {
        return succeeded || failed
    }

    @discardableResult public func then(_ callback: @escaping ThenBlock) -> Future<T> {
        if let value = self.value { //If the future has already been resolved with a value. Call the block immediately.

            return
        }
        
        self.result = .success(val)
        
        lockQueue.sync {
            self.thenBlock?(val)
