You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
464 B

//
// Optional+Extensions.swift
// RxDataSources
//
// Created by Krunoslav Zaher on 1/8/16.
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
//
import Foundation
extension Optional {
func unwrap() throws -> Wrapped {
if let unwrapped = self {
return unwrapped
}
else {
debugFatalError("Error during unwrapping optional")
throw DifferentiatorError.unwrappingOptional
}
}
}