       defer { condition.unlock() }
       trigger = true
       condition.broadcast()
-    }, onError: { error in
+    }, onError: { _ in
       condition.lock()
       defer { condition.unlock() }
       trigger = true

    onError: ((Swift.Error) -> Void)? = nil
  ) throws {
    var trigger = false
    var err: Swift.Error? = nil

    let condition = NSCondition()


import RxSwift

extension ObservableType {
  func compactMap<R>(_ transform: @escaping (Element) throws -> R?) -> Observable<R> {
    self
      .map(transform)
