|
1 | 1 | struct AnyMyViewControllerDelegate: MyViewControllerDelegate, _BridgedSwiftProtocolWrapper { |
2 | 2 | let jsObject: JSObject |
3 | 3 |
|
4 | | - func onSomethingHappened() -> Void { |
| 4 | + func onSomethingHappened() throws(JSException) -> Void { |
5 | 5 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
6 | 6 | _extern_onSomethingHappened(jsObjectValue) |
7 | 7 | } |
8 | 8 |
|
9 | | - func onValueChanged(_ value: String) -> Void { |
| 9 | + func onValueChanged(_ value: String) throws(JSException) -> Void { |
10 | 10 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
11 | 11 | let valueValue = value.bridgeJSLowerParameter() |
12 | 12 | _extern_onValueChanged(jsObjectValue, valueValue) |
13 | 13 | } |
14 | 14 |
|
15 | | - func onCountUpdated(count: Int) -> Bool { |
| 15 | + func onCountUpdated(count: Int) throws(JSException) -> Bool { |
16 | 16 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
17 | 17 | let countValue = count.bridgeJSLowerParameter() |
18 | 18 | let ret = _extern_onCountUpdated(jsObjectValue, countValue) |
19 | 19 | return Bool.bridgeJSLiftReturn(ret) |
20 | 20 | } |
21 | 21 |
|
22 | | - func onLabelUpdated(_ prefix: String, _ suffix: String) -> Void { |
| 22 | + func onLabelUpdated(_ prefix: String, _ suffix: String) throws(JSException) -> Void { |
23 | 23 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
24 | 24 | let prefixValue = prefix.bridgeJSLowerParameter() |
25 | 25 | let suffixValue = suffix.bridgeJSLowerParameter() |
26 | 26 | _extern_onLabelUpdated(jsObjectValue, prefixValue, suffixValue) |
27 | 27 | } |
28 | 28 |
|
29 | | - func isCountEven() -> Bool { |
| 29 | + func isCountEven() throws(JSException) -> Bool { |
30 | 30 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
31 | 31 | let ret = _extern_isCountEven(jsObjectValue) |
32 | 32 | return Bool.bridgeJSLiftReturn(ret) |
33 | 33 | } |
34 | 34 |
|
35 | | - func onHelperUpdated(_ helper: Helper) -> Void { |
| 35 | + func onHelperUpdated(_ helper: Helper) throws(JSException) -> Void { |
36 | 36 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
37 | 37 | let helperPointer = helper.bridgeJSLowerParameter() |
38 | 38 | _extern_onHelperUpdated(jsObjectValue, helperPointer) |
39 | 39 | } |
40 | 40 |
|
41 | | - func createHelper() -> Helper { |
| 41 | + func createHelper() throws(JSException) -> Helper { |
42 | 42 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
43 | 43 | let ret = _extern_createHelper(jsObjectValue) |
44 | 44 | return Helper.bridgeJSLiftReturn(ret) |
45 | 45 | } |
46 | 46 |
|
47 | | - func onOptionalHelperUpdated(_ helper: Optional<Helper>) -> Void { |
| 47 | + func onOptionalHelperUpdated(_ helper: Optional<Helper>) throws(JSException) -> Void { |
48 | 48 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
49 | 49 | let (helperIsSome, helperPointer) = helper.bridgeJSLowerParameter() |
50 | 50 | _extern_onOptionalHelperUpdated(jsObjectValue, helperIsSome, helperPointer) |
51 | 51 | } |
52 | 52 |
|
53 | | - func createOptionalHelper() -> Optional<Helper> { |
| 53 | + func createOptionalHelper() throws(JSException) -> Optional<Helper> { |
54 | 54 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
55 | 55 | let ret = _extern_createOptionalHelper(jsObjectValue) |
56 | 56 | return Optional<Helper>.bridgeJSLiftReturn(ret) |
57 | 57 | } |
58 | 58 |
|
59 | | - func createEnum() -> ExampleEnum { |
| 59 | + func createEnum() throws(JSException) -> ExampleEnum { |
60 | 60 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
61 | 61 | let ret = _extern_createEnum(jsObjectValue) |
62 | 62 | return ExampleEnum.bridgeJSLiftReturn(ret) |
63 | 63 | } |
64 | 64 |
|
65 | | - func handleResult(_ result: Result) -> Void { |
| 65 | + func handleResult(_ result: Result) throws(JSException) -> Void { |
66 | 66 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
67 | 67 | let resultCaseId = result.bridgeJSLowerParameter() |
68 | 68 | _extern_handleResult(jsObjectValue, resultCaseId) |
69 | 69 | } |
70 | 70 |
|
71 | | - func getResult() -> Result { |
| 71 | + func getResult() throws(JSException) -> Result { |
72 | 72 | let jsObjectValue = jsObject.bridgeJSLowerParameter() |
73 | 73 | let ret = _extern_getResult(jsObjectValue) |
74 | 74 | return Result.bridgeJSLiftReturn(ret) |
|
0 commit comments