alexeyxo / protobuf-swift

Google ProtocolBuffers for Apple Swift
http://protobuf.io/#swift
Apache License 2.0
938 stars 138 forks source link

Error handle error #160

Closed thandang closed 8 years ago

thandang commented 8 years ago

Version of protoc (protoc --version)

3.0

Version of ProtocolBuffers.framework

2.4.1

.proto file to reproduce

Description

I got a lot of errors when running in Xcode with compile result. I showed that call can throw, but it is nor marked with 'try' and the error is not handled Can we have a fix that?

Kind regards, Than Dang

alexeyxo commented 8 years ago

Get me example. How does you use try?

thandang commented 8 years ago

You have to input try! before an invoke function to fix the error. And I think the problem was about swift version, isn't it?

thandang commented 8 years ago

Here is the error I get https://monosnap.com/file/qXxX8LEuYJxT3SMVHFlDnk4pgsvCoA

alexeyxo commented 8 years ago

You use very oldest version of protobuf-swift.

thandang commented 8 years ago

hmm, let me check. Thanks a lot.

thandang commented 8 years ago

Cool, great help. Thank you so much. What I missing is not follow all step of installation by thinking about use CocoaPod instead. But the last step 7.Add ./src/ProtocolBuffers/ProtocolBuffers.xcodeproj in your project. we don't need actually.