UnwrapOrThrow This is a micro-package which simply create the ?! operator and the unwrap(orThrow:) convenience on Optional. Usage struct VarIsNil : Error {} let myOptionalVar: Int? = nil let nonOptionalOrThrow1 = try myOptionalVar ?! VarIsNil() let nonOptionalOrThrow2 = try myOptionalVar.unwrap(orThrow: VarIsNil())