Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c510bd6
[pigeon] Do not use FlutterError when generating Swift code
hpcnt-daniel-l Apr 25, 2024
d8968d7
[pigeon] Add option to whether emit PigeonError class in Swift code
hpcnt-daniel-l Apr 25, 2024
c2beea1
[pigeon] Simplify localizedDescription of PigeonError in Swift
hpcnt-daniel-l Apr 25, 2024
6a8a94c
[pigeon] Always make sure CoreTests.gen.swift has PigeonError class
hpcnt-daniel-l Apr 25, 2024
b874f09
[pigeon] Make PigeonError class final and add FlutterError initializer
hpcnt-daniel-l Apr 25, 2024
df102e3
[pigeon] Rename swiftEmitErrorClass to emitPigeonErrorClass
hpcnt-daniel-l Apr 25, 2024
b30a0cc
[pigeon] Make wrapError in swift also handle PigeonError
hpcnt-daniel-l Apr 26, 2024
30ac050
[pigeon] Emit Error class for Swift with different names per file
hpcnt-daniel-l Apr 26, 2024
92c97af
[pigeon] Restore docregion for swift-class
hpcnt-daniel-l Apr 26, 2024
86d9168
[pigeon] Add CHANGELOG.md entry
hpcnt-daniel-l Apr 26, 2024
20ac87a
[pigeon] Apply format fix
hpcnt-daniel-l Apr 26, 2024
800ba60
[pigeon] Generate Swift error on CoreTests.gen.swift
hpcnt-daniel-l Apr 26, 2024
8fa6b75
[pigeon] Fix unittests for swift generator
hpcnt-daniel-l Apr 26, 2024
4bd3dbc
[pigeon] Run update-excerpts
hpcnt-daniel-l Apr 26, 2024
fae49ea
[pigeon] Bump version correctly
hpcnt-daniel-l Apr 26, 2024
b386a96
Merge commit 'd670b2c38c8db0a773aa703e7d3f15682e05ad7f' into feature/…
hpcnt-daniel-l May 8, 2024
78c3bb6
Remove conversion from FlutterError to PigeonError in Swift
hpcnt-daniel-l May 9, 2024
f13a06a
Update the comment for the PigeonError class in Swift
hpcnt-daniel-l May 9, 2024
63df915
Update the documentation for using PigeonError in Swift
hpcnt-daniel-l May 9, 2024
428736d
Replace several usage of Indent.nest with Indent.writeScoped
hpcnt-daniel-l May 10, 2024
88cd27d
Update Changelog and README of pigeon package
hpcnt-daniel-l May 10, 2024
a78cae7
Addressing review comments
hpcnt-daniel-l May 10, 2024
4ed7852
Relocate PigeonError class in Swift files
hpcnt-daniel-l May 14, 2024
a8ab4f8
Merge branch 'main' into feature/pigeon-swift-error
tarrinneal May 14, 2024
877015d
Merge branch 'main' into feature/pigeon-swift-error
bc-lee May 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[pigeon] Run update-excerpts
  • Loading branch information
hpcnt-daniel-l committed Apr 26, 2024
commit 4bd3dbcb01c59bf7892051233988798dfc91dd97
5 changes: 2 additions & 3 deletions packages/pigeon/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,21 @@ This is the code that will use the generated Swift code to receive calls from Fl
packages/pigeon/example/app/ios/Runner/AppDelegate.swift
<?code-excerpt "ios/Runner/AppDelegate.swift (swift-class)"?>
```swift

private class PigeonApiImplementation: ExampleHostApi {
func getHostLanguage() throws -> String {
return "Swift"
}

func add(_ a: Int64, to b: Int64) throws -> Int64 {
if a < 0 || b < 0 {
throw PigeonError(code: "code", message: "message", details: "details")
throw FlutterError(code: "code", message: "message", details: "details")
}
return a + b
}

func sendMessage(message: MessageData, completion: @escaping (Result<Bool, Error>) -> Void) {
if message.code == Code.one {
completion(.failure(PigeonError(code: "code", message: "message", details: "details")))
completion(.failure(FlutterError(code: "code", message: "message", details: "details")))
return
}
completion(.success(true))
Expand Down