Merge lp:~robru/libfriends/exceptions into lp:libfriends
- exceptions
- Merge into trunk
Proposed by
Robert Bruce Park
Status: | Merged |
---|---|
Approved by: | Ken VanDine |
Approved revision: | 54 |
Merged at revision: | 45 |
Proposed branch: | lp:~robru/libfriends/exceptions |
Merge into: | lp:libfriends |
Diff against target: |
854 lines (+216/-171) 6 files modified
examples/example-vala.vala (+48/-11) gtk/account.vala (+18/-4) gtk/entry.vala (+58/-23) src/service.vala (+69/-121) src/utils.vala (+0/-1) tests/vala/test-service.vala (+23/-11) |
To merge this branch: | bzr merge lp:~robru/libfriends/exceptions |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ken VanDine | Approve | ||
Review via email: mp+143167@code.launchpad.net |
Commit message
Make libfriends throw exceptions, so we can catch and test for them in the testsuite.
Description of the change
Ok Ken, I massaged this to get rid of as many compiler warnings as I could.
To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote : | # |
lp:~robru/libfriends/exceptions
updated
- 54. By Robert Bruce Park
-
Add descriptions for @throws documentation.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'examples/example-vala.vala' | |||
2 | --- examples/example-vala.vala 2013-01-09 19:30:53 +0000 | |||
3 | +++ examples/example-vala.vala 2013-01-14 19:51:21 +0000 | |||
4 | @@ -29,7 +29,12 @@ | |||
5 | 29 | 29 | ||
6 | 30 | public Example (MainLoop loop) | 30 | public Example (MainLoop loop) |
7 | 31 | { | 31 | { |
9 | 32 | service = new Friends.Service(); | 32 | try { |
10 | 33 | service = new Friends.Service(); | ||
11 | 34 | } catch (GLib.IOError e) { | ||
12 | 35 | warning (e.message); | ||
13 | 36 | service = null; | ||
14 | 37 | } | ||
15 | 33 | } | 38 | } |
16 | 34 | 39 | ||
17 | 35 | public void run_example (string[] args) | 40 | public void run_example (string[] args) |
18 | @@ -41,7 +46,11 @@ | |||
19 | 41 | switch (args[1]) { | 46 | switch (args[1]) { |
20 | 42 | case "--refresh": | 47 | case "--refresh": |
21 | 43 | stdout.printf("Refreshing friends\n"); | 48 | stdout.printf("Refreshing friends\n"); |
23 | 44 | service.refresh(); | 49 | try { |
24 | 50 | service.refresh(); | ||
25 | 51 | } catch (GLib.IOError e) { | ||
26 | 52 | warning (e.message); | ||
27 | 53 | } | ||
28 | 45 | return; | 54 | return; |
29 | 46 | case "--features": | 55 | case "--features": |
30 | 47 | if (args.length < 3) { | 56 | if (args.length < 3) { |
31 | @@ -49,13 +58,21 @@ | |||
32 | 49 | return; | 58 | return; |
33 | 50 | } | 59 | } |
34 | 51 | stdout.printf("Getting features for %s\n", args[2]); | 60 | stdout.printf("Getting features for %s\n", args[2]); |
38 | 52 | var features = service.features(args[2]); | 61 | try { |
39 | 53 | foreach(string feature in features) | 62 | var features = service.features(args[2]); |
40 | 54 | stdout.printf("%s\n", feature); | 63 | foreach(string feature in features) |
41 | 64 | stdout.printf("%s\n", feature); | ||
42 | 65 | } catch (GLib.IOError e) { | ||
43 | 66 | warning (e.message); | ||
44 | 67 | } | ||
45 | 55 | return; | 68 | return; |
46 | 56 | case "--shutdown": | 69 | case "--shutdown": |
47 | 57 | stdout.printf("Shutting down the friends service\n"); | 70 | stdout.printf("Shutting down the friends service\n"); |
49 | 58 | service.quit(); | 71 | try { |
50 | 72 | service.quit(); | ||
51 | 73 | } catch (GLib.IOError e) { | ||
52 | 74 | warning (e.message); | ||
53 | 75 | } | ||
54 | 59 | return; | 76 | return; |
55 | 60 | 77 | ||
56 | 61 | case "--like": | 78 | case "--like": |
57 | @@ -69,7 +86,11 @@ | |||
58 | 69 | uint acct = int.parse(args[i+1]); | 86 | uint acct = int.parse(args[i+1]); |
59 | 70 | string id = args[i+2]; | 87 | string id = args[i+2]; |
60 | 71 | stdout.printf("Liked...\n"); | 88 | stdout.printf("Liked...\n"); |
62 | 72 | service.like(acct, id); | 89 | try { |
63 | 90 | service.like(acct, id); | ||
64 | 91 | } catch (GLib.IOError e) { | ||
65 | 92 | warning (e.message); | ||
66 | 93 | } | ||
67 | 73 | } else { | 94 | } else { |
68 | 74 | PrintUsage (); | 95 | PrintUsage (); |
69 | 75 | } | 96 | } |
70 | @@ -82,7 +103,11 @@ | |||
71 | 82 | uint acct = int.parse(args[i+1]); | 103 | uint acct = int.parse(args[i+1]); |
72 | 83 | string id = args[i+2]; | 104 | string id = args[i+2]; |
73 | 84 | stdout.printf("Unliked...\n"); | 105 | stdout.printf("Unliked...\n"); |
75 | 85 | service.unlike(acct, id); | 106 | try { |
76 | 107 | service.unlike(acct, id); | ||
77 | 108 | } catch (GLib.IOError e) { | ||
78 | 109 | warning (e.message); | ||
79 | 110 | } | ||
80 | 86 | } else { | 111 | } else { |
81 | 87 | PrintUsage (); | 112 | PrintUsage (); |
82 | 88 | } | 113 | } |
83 | @@ -95,7 +120,11 @@ | |||
84 | 95 | uint acct = int.parse(args[i+1]); | 120 | uint acct = int.parse(args[i+1]); |
85 | 96 | string id = args[i+2]; | 121 | string id = args[i+2]; |
86 | 97 | stdout.printf("Retweet...\n"); | 122 | stdout.printf("Retweet...\n"); |
88 | 98 | service.retweet(acct, id); | 123 | try { |
89 | 124 | service.retweet(acct, id); | ||
90 | 125 | } catch (GLib.IOError e) { | ||
91 | 126 | warning (e.message); | ||
92 | 127 | } | ||
93 | 99 | } else { | 128 | } else { |
94 | 100 | PrintUsage (); | 129 | PrintUsage (); |
95 | 101 | } | 130 | } |
96 | @@ -132,7 +161,11 @@ | |||
97 | 132 | string message = args[i+2]; | 161 | string message = args[i+2]; |
98 | 133 | stdout.printf("Posting...\n"); | 162 | stdout.printf("Posting...\n"); |
99 | 134 | stdout.printf ("message: %s\n account: %u\n", message, acct); | 163 | stdout.printf ("message: %s\n account: %u\n", message, acct); |
101 | 135 | service.send_message(acct, message); | 164 | try { |
102 | 165 | service.send_message(acct, message); | ||
103 | 166 | } catch (GLib.IOError e) { | ||
104 | 167 | warning (e.message); | ||
105 | 168 | } | ||
106 | 136 | } else { | 169 | } else { |
107 | 137 | PrintUsage (); | 170 | PrintUsage (); |
108 | 138 | } | 171 | } |
109 | @@ -151,7 +184,11 @@ | |||
110 | 151 | string message_id = args[i+2]; | 184 | string message_id = args[i+2]; |
111 | 152 | string message = args[i+3]; | 185 | string message = args[i+3]; |
112 | 153 | stdout.printf("Replying...\n"); | 186 | stdout.printf("Replying...\n"); |
114 | 154 | service.send_reply(acct, message_id, message); | 187 | try { |
115 | 188 | service.send_reply(acct, message_id, message); | ||
116 | 189 | } catch (GLib.IOError e) { | ||
117 | 190 | warning (e.message); | ||
118 | 191 | } | ||
119 | 155 | } else { | 192 | } else { |
120 | 156 | PrintUsage (); | 193 | PrintUsage (); |
121 | 157 | } | 194 | } |
122 | 158 | 195 | ||
123 | === modified file 'gtk/account.vala' | |||
124 | --- gtk/account.vala 2013-01-11 17:25:44 +0000 | |||
125 | +++ gtk/account.vala 2013-01-14 19:51:21 +0000 | |||
126 | @@ -82,8 +82,15 @@ | |||
127 | 82 | } | 82 | } |
128 | 83 | set { | 83 | set { |
129 | 84 | GLib.Value t = value; | 84 | GLib.Value t = value; |
132 | 85 | _account.set_value("friends/color", t); | 85 | try |
133 | 86 | _account.store_blocking(); | 86 | { |
134 | 87 | _account.set_value("friends/color", t); | ||
135 | 88 | _account.store_blocking(); | ||
136 | 89 | } | ||
137 | 90 | catch (Ag.AccountsError e) | ||
138 | 91 | { | ||
139 | 92 | warning (e.message); | ||
140 | 93 | } | ||
141 | 87 | } | 94 | } |
142 | 88 | } | 95 | } |
143 | 89 | 96 | ||
144 | @@ -117,8 +124,15 @@ | |||
145 | 117 | GLib.Value t = false; | 124 | GLib.Value t = false; |
146 | 118 | if (value == "1") | 125 | if (value == "1") |
147 | 119 | t = true; | 126 | t = true; |
150 | 120 | _account.set_value("friends/send_enabled", t); | 127 | try |
151 | 121 | _account.store_blocking(); | 128 | { |
152 | 129 | _account.set_value("friends/send_enabled", t); | ||
153 | 130 | _account.store_blocking(); | ||
154 | 131 | } | ||
155 | 132 | catch (Ag.AccountsError e) | ||
156 | 133 | { | ||
157 | 134 | warning (e.message); | ||
158 | 135 | } | ||
159 | 122 | } | 136 | } |
160 | 123 | } | 137 | } |
161 | 124 | 138 | ||
162 | 125 | 139 | ||
163 | === modified file 'gtk/entry.vala' | |||
164 | --- gtk/entry.vala 2013-01-11 17:25:44 +0000 | |||
165 | +++ gtk/entry.vala 2013-01-14 19:51:21 +0000 | |||
166 | @@ -48,7 +48,12 @@ | |||
167 | 48 | construct | 48 | construct |
168 | 49 | { | 49 | { |
169 | 50 | set_orientation (Gtk.Orientation.VERTICAL); | 50 | set_orientation (Gtk.Orientation.VERTICAL); |
171 | 51 | service = new Friends.Service (); | 51 | try { |
172 | 52 | service = new Friends.Service (); | ||
173 | 53 | } catch (GLib.IOError e) { | ||
174 | 54 | warning (e.message); | ||
175 | 55 | return; | ||
176 | 56 | } | ||
177 | 52 | 57 | ||
178 | 53 | text_view = new InputTextView (service); | 58 | text_view = new InputTextView (service); |
179 | 54 | target_bar = new AccountTargetBar (); | 59 | target_bar = new AccountTargetBar (); |
180 | @@ -97,7 +102,12 @@ | |||
181 | 97 | 102 | ||
182 | 98 | construct | 103 | construct |
183 | 99 | { | 104 | { |
185 | 100 | service = new Friends.Service (); | 105 | try { |
186 | 106 | service = new Friends.Service (); | ||
187 | 107 | } catch (GLib.IOError e) { | ||
188 | 108 | warning (e.message); | ||
189 | 109 | return; | ||
190 | 110 | } | ||
191 | 101 | 111 | ||
192 | 102 | text_view = new InputTextView (service); | 112 | text_view = new InputTextView (service); |
193 | 103 | send_bar = new SendBar (); | 113 | send_bar = new SendBar (); |
194 | @@ -124,14 +134,14 @@ | |||
195 | 124 | private Friends.Service service; | 134 | private Friends.Service service; |
196 | 125 | 135 | ||
197 | 126 | /** | 136 | /** |
199 | 127 | * The {@link Gdk.Color} for the foreground | 137 | * The {@link Gdk.RGBA} for the foreground |
200 | 128 | */ | 138 | */ |
202 | 129 | public Gdk.Color fg_color; | 139 | public Gdk.RGBA fg_color; |
203 | 130 | 140 | ||
204 | 131 | /** | 141 | /** |
206 | 132 | * The {@link Gdk.Color} for the error state | 142 | * The {@link Gdk.RGBA} for the error state |
207 | 133 | */ | 143 | */ |
209 | 134 | public Gdk.Color error_color; | 144 | public Gdk.RGBA error_color; |
210 | 135 | 145 | ||
211 | 136 | bool last_was_shortened = false; | 146 | bool last_was_shortened = false; |
212 | 137 | private string _mid = null; | 147 | private string _mid = null; |
213 | @@ -152,16 +162,25 @@ | |||
214 | 152 | 162 | ||
215 | 153 | construct | 163 | construct |
216 | 154 | { | 164 | { |
218 | 155 | service = new Friends.Service (); | 165 | try { |
219 | 166 | service = new Friends.Service (); | ||
220 | 167 | } catch (GLib.IOError e) { | ||
221 | 168 | warning (e.message); | ||
222 | 169 | return; | ||
223 | 170 | } | ||
224 | 156 | 171 | ||
225 | 157 | unowned Gtk.BindingSet binding_set; | 172 | unowned Gtk.BindingSet binding_set; |
226 | 158 | binding_set = Gtk.BindingSet.by_class (typeof (InputTextView).class_ref ()); | 173 | binding_set = Gtk.BindingSet.by_class (typeof (InputTextView).class_ref ()); |
227 | 159 | Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("Return"), 0, "submit", 0); | 174 | Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("Return"), 0, "submit", 0); |
228 | 160 | Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("KP_Enter"), 0, "submit", 0); | 175 | Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("KP_Enter"), 0, "submit", 0); |
229 | 161 | Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("Escape"), 0, "clear", 0); | 176 | Gtk.BindingEntry.add_signal (binding_set, Gdk.keyval_from_name ("Escape"), 0, "clear", 0); |
233 | 162 | fg_color = get_style ().text[Gtk.StateType.NORMAL]; | 177 | |
234 | 163 | 178 | // FIXME: How do we tell this StyleContext to get the color from the right place? | |
235 | 164 | Gdk.Color.parse ("indianred", out error_color); | 179 | Gtk.StyleContext context = new Gtk.StyleContext (); |
236 | 180 | fg_color = context.get_color (Gtk.StateFlags.NORMAL); | ||
237 | 181 | |||
238 | 182 | error_color = Gdk.RGBA (); | ||
239 | 183 | error_color.parse("indianred"); | ||
240 | 165 | 184 | ||
241 | 166 | get_buffer ().changed.connect (on_text_changed); | 185 | get_buffer ().changed.connect (on_text_changed); |
242 | 167 | get_buffer ().insert_text.connect (on_text_inserted); | 186 | get_buffer ().insert_text.connect (on_text_inserted); |
243 | @@ -232,8 +251,12 @@ | |||
244 | 232 | service.send_message(msg, null, null, null); | 251 | service.send_message(msg, null, null, null); |
245 | 233 | } | 252 | } |
246 | 234 | */ | 253 | */ |
249 | 235 | service.send_message(null, msg); | 254 | try { |
250 | 236 | debug ("(submit) Message: %s posted", msg); | 255 | service.send_message(null, msg); |
251 | 256 | debug ("(submit) Message: %s posted", msg); | ||
252 | 257 | } catch (GLib.IOError e) { | ||
253 | 258 | warning (e.message); | ||
254 | 259 | } | ||
255 | 237 | reset(); | 260 | reset(); |
256 | 238 | } | 261 | } |
257 | 239 | 262 | ||
258 | @@ -245,8 +268,10 @@ | |||
259 | 245 | private void on_text_changed () | 268 | private void on_text_changed () |
260 | 246 | { | 269 | { |
261 | 247 | var chars = get_buffer ().get_char_count (); | 270 | var chars = get_buffer ().get_char_count (); |
264 | 248 | modify_fg (Gtk.StateType.NORMAL, | 271 | override_color ( |
265 | 249 | chars > MAX_MESSAGE_LENGTH ? error_color : fg_color); | 272 | Gtk.StateFlags.NORMAL, |
266 | 273 | chars > MAX_MESSAGE_LENGTH ? error_color : fg_color | ||
267 | 274 | ); | ||
268 | 250 | } | 275 | } |
269 | 251 | 276 | ||
270 | 252 | private void on_text_inserted (ref Gtk.TextIter iter, string text, int len) | 277 | private void on_text_inserted (ref Gtk.TextIter iter, string text, int len) |
271 | @@ -258,9 +283,14 @@ | |||
272 | 258 | { | 283 | { |
273 | 259 | var buf = get_buffer (); | 284 | var buf = get_buffer (); |
274 | 260 | Signal.stop_emission_by_name (buf, "insert-text") ; | 285 | Signal.stop_emission_by_name (buf, "insert-text") ; |
278 | 261 | var shrt = service.shorten (text); | 286 | try { |
279 | 262 | last_was_shortened = true; | 287 | var shrt = service.shorten (text); |
280 | 263 | buf.insert (ref iter, shrt, -1); | 288 | last_was_shortened = true; |
281 | 289 | buf.insert (ref iter, shrt, -1); | ||
282 | 290 | } catch (GLib.IOError e) { | ||
283 | 291 | warning (e.message); | ||
284 | 292 | return; | ||
285 | 293 | } | ||
286 | 264 | } | 294 | } |
287 | 265 | else | 295 | else |
288 | 266 | { | 296 | { |
289 | @@ -300,9 +330,9 @@ | |||
290 | 300 | { | 330 | { |
291 | 301 | context.translate(-1, -1); | 331 | context.translate(-1, -1); |
292 | 302 | factor = 1.0; | 332 | factor = 1.0; |
294 | 303 | } else if (get_state () == 2) { | 333 | } else if (get_state_flags () == Gtk.StateFlags.PRELIGHT) { |
295 | 304 | factor = 0.3; | 334 | factor = 0.3; |
297 | 305 | } else if (get_state () == 1) { | 335 | } else if (get_state_flags () == Gtk.StateFlags.ACTIVE) { |
298 | 306 | factor = 0.5; | 336 | factor = 0.5; |
299 | 307 | } | 337 | } |
300 | 308 | 338 | ||
301 | @@ -354,10 +384,10 @@ | |||
302 | 354 | { | 384 | { |
303 | 355 | Object (spacing:0); | 385 | Object (spacing:0); |
304 | 356 | } | 386 | } |
306 | 357 | 387 | ||
307 | 358 | /* | 388 | /* |
308 | 359 | * The {@Ag.Account.id} of the account button to be displayed | 389 | * The {@Ag.Account.id} of the account button to be displayed |
310 | 360 | * This is used in the case of replies or private messages | 390 | * This is used in the case of replies or private messages |
311 | 361 | * where the post will only go to a single account | 391 | * where the post will only go to a single account |
312 | 362 | */ | 392 | */ |
313 | 363 | public uint? selected { | 393 | public uint? selected { |
314 | @@ -402,7 +432,12 @@ | |||
315 | 402 | if (GLib.FileUtils.test (local_icon_path, GLib.FileTest.IS_DIR)) | 432 | if (GLib.FileUtils.test (local_icon_path, GLib.FileTest.IS_DIR)) |
316 | 403 | icon_theme.prepend_search_path (local_icon_path); | 433 | icon_theme.prepend_search_path (local_icon_path); |
317 | 404 | 434 | ||
319 | 405 | service = new Friends.Service(); | 435 | try { |
320 | 436 | service = new Friends.Service (); | ||
321 | 437 | } catch (GLib.IOError e) { | ||
322 | 438 | warning (e.message); | ||
323 | 439 | return; | ||
324 | 440 | } | ||
325 | 406 | accounts_service = new FriendsAccounts(); | 441 | accounts_service = new FriendsAccounts(); |
326 | 407 | 442 | ||
327 | 408 | // Add buttons to button area at the bottom | 443 | // Add buttons to button area at the bottom |
328 | @@ -490,7 +525,7 @@ | |||
329 | 490 | return account_button; | 525 | return account_button; |
330 | 491 | } | 526 | } |
331 | 492 | 527 | ||
333 | 493 | /* | 528 | /* |
334 | 494 | * Set the number of remaining characters allowed to post | 529 | * Set the number of remaining characters allowed to post |
335 | 495 | * @param chars Number of characters remaining | 530 | * @param chars Number of characters remaining |
336 | 496 | */ | 531 | */ |
337 | 497 | 532 | ||
338 | === modified file 'src/service.vala' | |||
339 | --- src/service.vala 2013-01-11 18:53:44 +0000 | |||
340 | +++ src/service.vala 2013-01-14 19:51:21 +0000 | |||
341 | @@ -51,8 +51,10 @@ | |||
342 | 51 | /** | 51 | /** |
343 | 52 | * Establish a connection to the local Friends Service daemon. | 52 | * Establish a connection to the local Friends Service daemon. |
344 | 53 | * @return a new Service | 53 | * @return a new Service |
345 | 54 | * @throws GLib.IOError if failed to connect to the | ||
346 | 55 | * Friends Service daemon. | ||
347 | 54 | */ | 56 | */ |
349 | 55 | public Service () | 57 | public Service () throws IOError |
350 | 56 | { | 58 | { |
351 | 57 | Object (); | 59 | Object (); |
352 | 58 | try | 60 | try |
353 | @@ -65,7 +67,8 @@ | |||
354 | 65 | } | 67 | } |
355 | 66 | catch (GLib.IOError e) | 68 | catch (GLib.IOError e) |
356 | 67 | { | 69 | { |
358 | 68 | warning ("Unable to get Gwibber service: "+e.message); | 70 | warning ("Unable to get Friends service: "+e.message); |
359 | 71 | throw (e); | ||
360 | 69 | } | 72 | } |
361 | 70 | } | 73 | } |
362 | 71 | 74 | ||
363 | @@ -82,16 +85,17 @@ | |||
364 | 82 | * parameter and is rather arbitrary. | 85 | * parameter and is rather arbitrary. |
365 | 83 | * | 86 | * |
366 | 84 | * @since 0.1 | 87 | * @since 0.1 |
367 | 88 | * @throws GLib.IOError if action failed. | ||
368 | 85 | */ | 89 | */ |
370 | 86 | private bool do(string action, string account_id, string argument) | 90 | private bool do(string action, string account_id, string argument) throws IOError |
371 | 87 | { | 91 | { |
372 | 88 | try { | 92 | try { |
373 | 89 | service.Do(action, account_id, argument); | 93 | service.Do(action, account_id, argument); |
374 | 90 | return true; | 94 | return true; |
376 | 91 | } catch (GLib.Error e) { | 95 | } catch (GLib.IOError e) { |
377 | 92 | warning (e.message); | 96 | warning (e.message); |
378 | 97 | throw (e); | ||
379 | 93 | } | 98 | } |
380 | 94 | return false; | ||
381 | 95 | } | 99 | } |
382 | 96 | 100 | ||
383 | 97 | /** | 101 | /** |
384 | @@ -101,28 +105,22 @@ | |||
385 | 101 | * to exit, preventing any other clients from accessing it. | 105 | * to exit, preventing any other clients from accessing it. |
386 | 102 | * | 106 | * |
387 | 103 | * @since 0.1 | 107 | * @since 0.1 |
388 | 108 | * @throws GLib.IOError if the call to Friends.Service.Quit fails. | ||
389 | 104 | */ | 109 | */ |
391 | 105 | public void quit() | 110 | public void quit() throws IOError |
392 | 106 | { | 111 | { |
398 | 107 | try { | 112 | service.Quit(); |
394 | 108 | service.Quit(); | ||
395 | 109 | } catch (GLib.IOError e) { | ||
396 | 110 | warning (e.message); | ||
397 | 111 | } | ||
399 | 112 | } | 113 | } |
400 | 113 | 114 | ||
401 | 114 | /** | 115 | /** |
402 | 115 | * Perform a refresh of all enabled accounts. | 116 | * Perform a refresh of all enabled accounts. |
403 | 116 | * | 117 | * |
404 | 117 | * @since 0.1 | 118 | * @since 0.1 |
405 | 119 | * @throws GLib.IOError if the call to Friends.Service.Refresh fails. | ||
406 | 118 | */ | 120 | */ |
408 | 119 | public void refresh() | 121 | public void refresh() throws IOError |
409 | 120 | { | 122 | { |
415 | 121 | try { | 123 | service.Refresh(); |
411 | 122 | service.Refresh(); | ||
412 | 123 | } catch (GLib.IOError e) { | ||
413 | 124 | warning (e.message); | ||
414 | 125 | } | ||
416 | 126 | } | 124 | } |
417 | 127 | 125 | ||
418 | 128 | /** | 126 | /** |
419 | @@ -137,8 +135,9 @@ | |||
420 | 137 | * uploaded photo. | 135 | * uploaded photo. |
421 | 138 | * | 136 | * |
422 | 139 | * @since 0.1 | 137 | * @since 0.1 |
423 | 138 | * @throws GLib.IOError if the call to Friends.Service.Upload fails. | ||
424 | 140 | */ | 139 | */ |
426 | 141 | public void upload(uint account_id, string uri, string description) | 140 | public void upload(uint account_id, string uri, string description) throws IOError |
427 | 142 | { | 141 | { |
428 | 143 | string result_url = null; | 142 | string result_url = null; |
429 | 144 | service.Upload.begin(account_id.to_string(), uri, description, (obj, res) => { | 143 | service.Upload.begin(account_id.to_string(), uri, description, (obj, res) => { |
430 | @@ -146,6 +145,7 @@ | |||
431 | 146 | service.Upload.end(res, out result_url); | 145 | service.Upload.end(res, out result_url); |
432 | 147 | } catch (IOError e) { | 146 | } catch (IOError e) { |
433 | 148 | warning (e.message); | 147 | warning (e.message); |
434 | 148 | throw (e); | ||
435 | 149 | } | 149 | } |
436 | 150 | }); | 150 | }); |
437 | 151 | } | 151 | } |
438 | @@ -161,16 +161,11 @@ | |||
439 | 161 | * uploaded file. | 161 | * uploaded file. |
440 | 162 | * | 162 | * |
441 | 163 | * @since 0.1 | 163 | * @since 0.1 |
443 | 164 | * @throws GLib.IOError if uploading the image failed. | 164 | * @throws GLib.IOError if the call to Friends.Service.Upload fails. |
444 | 165 | */ | 165 | */ |
445 | 166 | public async void upload_async(uint account_id, string uri, string description, out string result_url) throws IOError | 166 | public async void upload_async(uint account_id, string uri, string description, out string result_url) throws IOError |
446 | 167 | { | 167 | { |
453 | 168 | try { | 168 | yield service.Upload(account_id.to_string(), uri, description, out result_url); |
448 | 169 | yield service.Upload(account_id.to_string(), uri, description, out result_url); | ||
449 | 170 | } catch (IOError e) { | ||
450 | 171 | warning (e.message); | ||
451 | 172 | throw (e); | ||
452 | 173 | } | ||
454 | 174 | } | 169 | } |
455 | 175 | 170 | ||
456 | 176 | 171 | ||
457 | @@ -189,16 +184,17 @@ | |||
458 | 189 | * @return ``true`` for success, ``false`` otherwise | 184 | * @return ``true`` for success, ``false`` otherwise |
459 | 190 | * | 185 | * |
460 | 191 | * @since 0.1 | 186 | * @since 0.1 |
461 | 187 | * @throws GLib.IOError if the call to Friends.Service.SendReply fails. | ||
462 | 192 | */ | 188 | */ |
464 | 193 | public bool send_reply(uint account_id, string message_id, string message) | 189 | public bool send_reply(uint account_id, string message_id, string message) throws IOError |
465 | 194 | { | 190 | { |
466 | 195 | try { | 191 | try { |
467 | 196 | service.SendReply(message, account_id.to_string(), message_id); | 192 | service.SendReply(message, account_id.to_string(), message_id); |
468 | 197 | return true; | 193 | return true; |
470 | 198 | } catch (GLib.Error e) { | 194 | } catch (GLib.IOError e) { |
471 | 199 | warning (e.message); | 195 | warning (e.message); |
472 | 196 | throw (e); | ||
473 | 200 | } | 197 | } |
474 | 201 | return false; | ||
475 | 202 | } | 198 | } |
476 | 203 | 199 | ||
477 | 204 | 200 | ||
478 | @@ -210,19 +206,15 @@ | |||
479 | 210 | * @return ``true`` for success, ``false`` otherwise | 206 | * @return ``true`` for success, ``false`` otherwise |
480 | 211 | * | 207 | * |
481 | 212 | * @since 0.1 | 208 | * @since 0.1 |
482 | 209 | * @throws GLib.IOError if the call to Friends.Service.SendMessage fails. | ||
483 | 213 | */ | 210 | */ |
485 | 214 | public bool send_message(uint? account_id, string message) | 211 | public bool send_message(uint? account_id, string message) throws IOError |
486 | 215 | { | 212 | { |
497 | 216 | try { | 213 | if (account_id != null) |
498 | 217 | if (account_id != null) | 214 | return do("send", account_id.to_string(), message); |
499 | 218 | return do("send", account_id.to_string(), message); | 215 | else |
500 | 219 | else | 216 | service.SendMessage(message); |
501 | 220 | service.SendMessage(message); | 217 | return true; |
492 | 221 | return true; | ||
493 | 222 | } catch (GLib.Error e) { | ||
494 | 223 | warning (e.message); | ||
495 | 224 | } | ||
496 | 225 | return false; | ||
502 | 226 | } | 218 | } |
503 | 227 | 219 | ||
504 | 228 | /** | 220 | /** |
505 | @@ -233,15 +225,11 @@ | |||
506 | 233 | * @return ``true`` for success, ``false`` otherwise | 225 | * @return ``true`` for success, ``false`` otherwise |
507 | 234 | * | 226 | * |
508 | 235 | * @since 0.1 | 227 | * @since 0.1 |
509 | 228 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
510 | 236 | */ | 229 | */ |
512 | 237 | public bool retweet(uint account_id, string message_id) | 230 | public bool retweet(uint account_id, string message_id) throws IOError |
513 | 238 | { | 231 | { |
520 | 239 | try { | 232 | return do("retweet", account_id.to_string(), message_id); |
515 | 240 | return do("retweet", account_id.to_string(), message_id); | ||
516 | 241 | } catch (GLib.Error e) { | ||
517 | 242 | warning (e.message); | ||
518 | 243 | } | ||
519 | 244 | return false; | ||
521 | 245 | } | 233 | } |
522 | 246 | 234 | ||
523 | 247 | /** | 235 | /** |
524 | @@ -254,15 +242,11 @@ | |||
525 | 254 | * @return ``true`` for success, ``false`` otherwise | 242 | * @return ``true`` for success, ``false`` otherwise |
526 | 255 | * | 243 | * |
527 | 256 | * @since 0.1 | 244 | * @since 0.1 |
528 | 245 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
529 | 257 | */ | 246 | */ |
531 | 258 | public bool home(uint account_id) | 247 | public bool home(uint account_id) throws IOError |
532 | 259 | { | 248 | { |
539 | 260 | try { | 249 | return do("home", account_id.to_string(), ""); |
534 | 261 | return do("home", account_id.to_string(), ""); | ||
535 | 262 | } catch (GLib.Error e) { | ||
536 | 263 | warning (e.message); | ||
537 | 264 | } | ||
538 | 265 | return false; | ||
540 | 266 | } | 250 | } |
541 | 267 | 251 | ||
542 | 268 | /** | 252 | /** |
543 | @@ -276,15 +260,11 @@ | |||
544 | 276 | * @return ``true`` for success, ``false`` otherwise | 260 | * @return ``true`` for success, ``false`` otherwise |
545 | 277 | * | 261 | * |
546 | 278 | * @since 0.1 | 262 | * @since 0.1 |
547 | 263 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
548 | 279 | */ | 264 | */ |
550 | 280 | public bool wall(uint account_id) | 265 | public bool wall(uint account_id) throws IOError |
551 | 281 | { | 266 | { |
558 | 282 | try { | 267 | return do("wall", account_id.to_string(), ""); |
553 | 283 | return do("wall", account_id.to_string(), ""); | ||
554 | 284 | } catch (GLib.Error e) { | ||
555 | 285 | warning (e.message); | ||
556 | 286 | } | ||
557 | 287 | return false; | ||
559 | 288 | } | 268 | } |
560 | 289 | 269 | ||
561 | 290 | /** | 270 | /** |
562 | @@ -296,18 +276,14 @@ | |||
563 | 296 | * @return ``true`` for success, ``false`` otherwise | 276 | * @return ``true`` for success, ``false`` otherwise |
564 | 297 | * | 277 | * |
565 | 298 | * @since 0.1 | 278 | * @since 0.1 |
566 | 279 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
567 | 299 | */ | 280 | */ |
569 | 300 | public bool search(uint? account_id, string query) | 281 | public bool search(uint? account_id, string query) throws IOError |
570 | 301 | { | 282 | { |
580 | 302 | try { | 283 | if (account_id != null) |
581 | 303 | if (account_id != null) | 284 | return do("search", account_id.to_string(), query); |
582 | 304 | return do("search", account_id.to_string(), query); | 285 | else |
583 | 305 | else | 286 | return do("search", "", query); |
575 | 306 | return do("search", "", query); | ||
576 | 307 | } catch (GLib.Error e) { | ||
577 | 308 | warning (e.message); | ||
578 | 309 | } | ||
579 | 310 | return false; | ||
584 | 311 | } | 287 | } |
585 | 312 | 288 | ||
586 | 313 | /** | 289 | /** |
587 | @@ -319,15 +295,11 @@ | |||
588 | 319 | * @return ``true`` for success, ``false`` otherwise | 295 | * @return ``true`` for success, ``false`` otherwise |
589 | 320 | * | 296 | * |
590 | 321 | * @since 0.1 | 297 | * @since 0.1 |
591 | 298 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
592 | 322 | */ | 299 | */ |
594 | 323 | public bool like(uint account_id, string message_id) | 300 | public bool like(uint account_id, string message_id) throws IOError |
595 | 324 | { | 301 | { |
602 | 325 | try { | 302 | return do("like", account_id.to_string(), message_id); |
597 | 326 | return do("like", account_id.to_string(), message_id); | ||
598 | 327 | } catch (GLib.Error e) { | ||
599 | 328 | warning (e.message); | ||
600 | 329 | } | ||
601 | 330 | return false; | ||
603 | 331 | } | 303 | } |
604 | 332 | 304 | ||
605 | 333 | /** | 305 | /** |
606 | @@ -339,15 +311,11 @@ | |||
607 | 339 | * @return ``true`` for success, ``false`` otherwise | 311 | * @return ``true`` for success, ``false`` otherwise |
608 | 340 | * | 312 | * |
609 | 341 | * @since 0.1 | 313 | * @since 0.1 |
610 | 314 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
611 | 342 | */ | 315 | */ |
613 | 343 | public bool unlike(uint account_id, string message_id) | 316 | public bool unlike(uint account_id, string message_id) throws IOError |
614 | 344 | { | 317 | { |
621 | 345 | try { | 318 | return do("unlike", account_id.to_string(), message_id); |
616 | 346 | return do("unlike", account_id.to_string(), message_id); | ||
617 | 347 | } catch (GLib.Error e) { | ||
618 | 348 | warning (e.message); | ||
619 | 349 | } | ||
620 | 350 | return false; | ||
622 | 351 | } | 319 | } |
623 | 352 | 320 | ||
624 | 353 | /** | 321 | /** |
625 | @@ -359,15 +327,11 @@ | |||
626 | 359 | * @return ``true`` for success, ``false`` otherwise | 327 | * @return ``true`` for success, ``false`` otherwise |
627 | 360 | * | 328 | * |
628 | 361 | * @since 0.1 | 329 | * @since 0.1 |
629 | 330 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
630 | 362 | */ | 331 | */ |
632 | 363 | public bool delete(uint account_id, string message_id) | 332 | public bool delete(uint account_id, string message_id) throws IOError |
633 | 364 | { | 333 | { |
640 | 365 | try { | 334 | return do("delete", account_id.to_string(), message_id); |
635 | 366 | return do("delete", account_id.to_string(), message_id); | ||
636 | 367 | } catch (GLib.Error e) { | ||
637 | 368 | warning (e.message); | ||
638 | 369 | } | ||
639 | 370 | return false; | ||
641 | 371 | } | 335 | } |
642 | 372 | 336 | ||
643 | 373 | /** | 337 | /** |
644 | @@ -378,15 +342,11 @@ | |||
645 | 378 | * @return ``true`` for success, ``false`` otherwise | 342 | * @return ``true`` for success, ``false`` otherwise |
646 | 379 | * | 343 | * |
647 | 380 | * @since 0.1 | 344 | * @since 0.1 |
648 | 345 | * @throws GLib.IOError if the call to Friends.Service.Do fails. | ||
649 | 381 | */ | 346 | */ |
651 | 382 | public bool contacts(uint account_id) | 347 | public bool contacts(uint account_id) throws IOError |
652 | 383 | { | 348 | { |
659 | 384 | try { | 349 | return do("contacts", account_id.to_string(), ""); |
654 | 385 | return do("contacts", account_id.to_string(), ""); | ||
655 | 386 | } catch (GLib.Error e) { | ||
656 | 387 | warning (e.message); | ||
657 | 388 | } | ||
658 | 389 | return false; | ||
660 | 390 | } | 350 | } |
661 | 391 | 351 | ||
662 | 392 | /** | 352 | /** |
663 | @@ -396,25 +356,18 @@ | |||
664 | 396 | * @return The shortened URL. | 356 | * @return The shortened URL. |
665 | 397 | * | 357 | * |
666 | 398 | * @since 0.1 | 358 | * @since 0.1 |
667 | 359 | * @throws GLib.IOError if the call to Friends.Service.URLShorten fails. | ||
668 | 399 | */ | 360 | */ |
670 | 400 | public string shorten(string url) | 361 | public string shorten(string url) throws IOError |
671 | 401 | { | 362 | { |
681 | 402 | try | 363 | return service.URLShorten(url); |
673 | 403 | { | ||
674 | 404 | return service.URLShorten(url); | ||
675 | 405 | } | ||
676 | 406 | catch (GLib.IOError e) | ||
677 | 407 | { | ||
678 | 408 | warning (e.message); | ||
679 | 409 | return url; | ||
680 | 410 | } | ||
682 | 411 | } | 364 | } |
683 | 412 | 365 | ||
684 | 413 | /** | 366 | /** |
685 | 414 | * This method returns a list of all the possible actions | 367 | * This method returns a list of all the possible actions |
686 | 415 | * supported by a given protocol. This can be used to | 368 | * supported by a given protocol. This can be used to |
689 | 416 | * determine what actions are available for the requested | 369 | * determine what actions are available for the requested |
690 | 417 | * protocol. | 370 | * protocol. |
691 | 418 | * | 371 | * |
692 | 419 | * @param protocol One of ``facebook``, ``flickr``, | 372 | * @param protocol One of ``facebook``, ``flickr``, |
693 | 420 | * ``foursquare``, ``identica``, or ``twitter``. | 373 | * ``foursquare``, ``identica``, or ``twitter``. |
694 | @@ -422,19 +375,16 @@ | |||
695 | 422 | * features) if there are no features found for ``protocol``. | 375 | * features) if there are no features found for ``protocol``. |
696 | 423 | * | 376 | * |
697 | 424 | * @since 0.1 | 377 | * @since 0.1 |
698 | 378 | * @throws GLib.Error if the call to Friends.Service.GetFeatures fails. | ||
699 | 425 | */ | 379 | */ |
701 | 426 | public string[] features(string protocol) | 380 | public string[] features(string protocol) throws Error |
702 | 427 | { | 381 | { |
703 | 428 | string[] _features = null; | 382 | string[] _features = null; |
704 | 429 | try { | ||
705 | 430 | var parser = new Json.Parser(); | 383 | var parser = new Json.Parser(); |
706 | 431 | parser.load_from_data(service.GetFeatures(protocol), -1); | 384 | parser.load_from_data(service.GetFeatures(protocol), -1); |
707 | 432 | var nodes = parser.get_root().get_array().get_elements(); | 385 | var nodes = parser.get_root().get_array().get_elements(); |
708 | 433 | foreach(var node in nodes) | 386 | foreach(var node in nodes) |
709 | 434 | _features += node.dup_string (); | 387 | _features += node.dup_string (); |
710 | 435 | } catch(GLib.Error e) { | ||
711 | 436 | warning(e.message); | ||
712 | 437 | } | ||
713 | 438 | return _features; | 388 | return _features; |
714 | 439 | } | 389 | } |
715 | 440 | 390 | ||
716 | @@ -442,14 +392,12 @@ | |||
717 | 442 | * Clear all notifications from the messaging menu. | 392 | * Clear all notifications from the messaging menu. |
718 | 443 | * | 393 | * |
719 | 444 | * @since 0.1 | 394 | * @since 0.1 |
720 | 395 | * @throws GLib.IOError if the call to Friends.Service.ClearIndicators | ||
721 | 396 | * fails. | ||
722 | 445 | */ | 397 | */ |
724 | 446 | public void messaging_menu_clear() | 398 | public void messaging_menu_clear() throws IOError |
725 | 447 | { | 399 | { |
731 | 448 | try { | 400 | service.ClearIndicators(); |
727 | 449 | service.ClearIndicators(); | ||
728 | 450 | } catch (GLib.IOError e) { | ||
729 | 451 | warning (e.message); | ||
730 | 452 | } | ||
732 | 453 | } | 401 | } |
733 | 454 | 402 | ||
734 | 455 | private void connection_offline() | 403 | private void connection_offline() |
735 | 456 | 404 | ||
736 | === modified file 'src/utils.vala' | |||
737 | --- src/utils.vala 2013-01-09 18:50:08 +0000 | |||
738 | +++ src/utils.vala 2013-01-14 19:51:21 +0000 | |||
739 | @@ -54,7 +54,6 @@ | |||
740 | 54 | { | 54 | { |
741 | 55 | string _avatar_cache_image = Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_user_cache_dir(), "friends/avatars", GLib.Checksum.compute_for_string (GLib.ChecksumType.SHA1, url)); | 55 | string _avatar_cache_image = Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_user_cache_dir(), "friends/avatars", GLib.Checksum.compute_for_string (GLib.ChecksumType.SHA1, url)); |
742 | 56 | debug ("AVATAR PATH: %s", _avatar_cache_image); | 56 | debug ("AVATAR PATH: %s", _avatar_cache_image); |
743 | 57 | var file = File.new_for_path (_avatar_cache_image); | ||
744 | 58 | return _avatar_cache_image; | 57 | return _avatar_cache_image; |
745 | 59 | } | 58 | } |
746 | 60 | } | 59 | } |
747 | 61 | 60 | ||
748 | === modified file 'tests/vala/test-service.vala' | |||
749 | --- tests/vala/test-service.vala 2013-01-09 19:41:41 +0000 | |||
750 | +++ tests/vala/test-service.vala 2013-01-14 19:51:21 +0000 | |||
751 | @@ -61,9 +61,20 @@ | |||
752 | 61 | ServiceSuite.test_url_shorten); | 61 | ServiceSuite.test_url_shorten); |
753 | 62 | } | 62 | } |
754 | 63 | 63 | ||
755 | 64 | static Friends.Service? get_service () | ||
756 | 65 | { | ||
757 | 66 | Friends.Service service = null; | ||
758 | 67 | try { | ||
759 | 68 | service = new Friends.Service (); | ||
760 | 69 | } catch (GLib.IOError e) { | ||
761 | 70 | warning(e.message); | ||
762 | 71 | } | ||
763 | 72 | return service; | ||
764 | 73 | } | ||
765 | 74 | |||
766 | 64 | internal static void test_refresh () | 75 | internal static void test_refresh () |
767 | 65 | { | 76 | { |
769 | 66 | var service = new Friends.Service (); | 77 | var service = get_service (); |
770 | 67 | bool success = false; | 78 | bool success = false; |
771 | 68 | try | 79 | try |
772 | 69 | { | 80 | { |
773 | @@ -80,7 +91,7 @@ | |||
774 | 80 | 91 | ||
775 | 81 | internal static void test_quit () | 92 | internal static void test_quit () |
776 | 82 | { | 93 | { |
778 | 83 | var service = new Friends.Service (); | 94 | var service = get_service (); |
779 | 84 | bool success = false; | 95 | bool success = false; |
780 | 85 | try | 96 | try |
781 | 86 | { | 97 | { |
782 | @@ -97,22 +108,23 @@ | |||
783 | 97 | 108 | ||
784 | 98 | internal static void test_features () | 109 | internal static void test_features () |
785 | 99 | { | 110 | { |
788 | 100 | var service = new Friends.Service (); | 111 | var service = get_service (); |
789 | 101 | string[] features; | 112 | string[] features = null; |
790 | 102 | try | 113 | try |
791 | 103 | { | 114 | { |
792 | 104 | features = service.features ("twitter"); | 115 | features = service.features ("twitter"); |
793 | 105 | } | 116 | } |
795 | 106 | catch (GLib.IOError e) | 117 | catch (GLib.Error e) |
796 | 107 | { | 118 | { |
797 | 108 | warning ("Failed to get features - %s", e.message); | 119 | warning ("Failed to get features - %s", e.message); |
798 | 109 | } | 120 | } |
799 | 121 | assert (features != null); | ||
800 | 110 | assert ("send" in features); | 122 | assert ("send" in features); |
801 | 111 | } | 123 | } |
802 | 112 | 124 | ||
803 | 113 | internal static void test_upload () | 125 | internal static void test_upload () |
804 | 114 | { | 126 | { |
806 | 115 | var service = new Friends.Service (); | 127 | var service = get_service (); |
807 | 116 | uint acct = 1; | 128 | uint acct = 1; |
808 | 117 | string uri = "file:///tmp/foo.png"; | 129 | string uri = "file:///tmp/foo.png"; |
809 | 118 | string desc = "Something interesting to say"; | 130 | string desc = "Something interesting to say"; |
810 | @@ -129,7 +141,7 @@ | |||
811 | 129 | 141 | ||
812 | 130 | internal static void test_send_message () | 142 | internal static void test_send_message () |
813 | 131 | { | 143 | { |
815 | 132 | var service = new Friends.Service (); | 144 | var service = get_service (); |
816 | 133 | uint? acct = null; | 145 | uint? acct = null; |
817 | 134 | string msg = "A message"; | 146 | string msg = "A message"; |
818 | 135 | bool success = false; | 147 | bool success = false; |
819 | @@ -147,7 +159,7 @@ | |||
820 | 147 | 159 | ||
821 | 148 | internal static void test_send_message_with_account () | 160 | internal static void test_send_message_with_account () |
822 | 149 | { | 161 | { |
824 | 150 | var service = new Friends.Service (); | 162 | var service = get_service (); |
825 | 151 | uint acct = 1; | 163 | uint acct = 1; |
826 | 152 | string msg = "A message"; | 164 | string msg = "A message"; |
827 | 153 | bool success = false; | 165 | bool success = false; |
828 | @@ -165,7 +177,7 @@ | |||
829 | 165 | 177 | ||
830 | 166 | internal static void test_send_reply () | 178 | internal static void test_send_reply () |
831 | 167 | { | 179 | { |
833 | 168 | var service = new Friends.Service (); | 180 | var service = get_service (); |
834 | 169 | uint acct = 1; | 181 | uint acct = 1; |
835 | 170 | string msg = "A message"; | 182 | string msg = "A message"; |
836 | 171 | string msg_id = "100"; | 183 | string msg_id = "100"; |
837 | @@ -184,7 +196,7 @@ | |||
838 | 184 | 196 | ||
839 | 185 | internal static void test_clear_indicators () | 197 | internal static void test_clear_indicators () |
840 | 186 | { | 198 | { |
842 | 187 | var service = new Friends.Service (); | 199 | var service = get_service (); |
843 | 188 | bool success = false; | 200 | bool success = false; |
844 | 189 | try | 201 | try |
845 | 190 | { | 202 | { |
846 | @@ -200,7 +212,7 @@ | |||
847 | 200 | 212 | ||
848 | 201 | internal static void test_url_shorten () | 213 | internal static void test_url_shorten () |
849 | 202 | { | 214 | { |
851 | 203 | var service = new Friends.Service (); | 215 | var service = get_service (); |
852 | 204 | string result = ""; | 216 | string result = ""; |
853 | 205 | try | 217 | try |
854 | 206 | { | 218 | { |
My previous branch was missing descriptions in the docstrings for all the throws I added. I've fixed that in lp:~ken-vandine/friends/exceptions
Please merge that into your branch.