Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

clean up exceptions

  • Loading branch information...
commit fb32032bbf19936c1ad0d4b364f2aec06c622480 1 parent dd86792
Thomas Weißschuh authored

Showing 1 changed file with 7 additions and 4 deletions. Show diff stats Hide diff stats

  1. +7 4 taterm.vala
11 taterm.vala
@@ -34,13 +34,16 @@ class taterm : Gtk.Application
34 34 try {
35 35 var regex_flags = RegexCompileFlags.CASELESS + RegexCompileFlags.OPTIMIZE;
36 36 uri_regex = new GLib.Regex(regex_string, regex_flags);
37   - } catch {}
  37 + } catch (RegexError err) {
  38 + GLib.assert_not_reached ();
  39 + }
38 40
39 41 activate.connect(() => {
40 42 var newWin = new Window(pwd);
41 43 add_window(newWin);
42 44 newWin.focus_out_event.connect(() => {
43 45 pwd = newWin.pwd;
  46 + /* TODO change to GDK_EVENT_PROPAGATE, when .vapi provides it */
44 47 return false;
45 48 });
46 49 });
@@ -79,7 +82,7 @@ class taterm : Gtk.Application
79 82 this.focus_in_event.connect( () => {
80 83 this.urgency_hint = false;
81 84 /* TODO change to GDK_EVENT_PROPAGATE, when .vapi provides it */
82   - //return false;
  85 + return false;
83 86 });
84 87
85 88 term.child_exited.connect ( ()=> {
@@ -148,7 +151,7 @@ class taterm : Gtk.Application
148 151 Maybe people don't want to call xdg-open
149 152 */
150 153 GLib.Process.spawn_command_line_async(@"xdg-open $(match_uri)");
151   - } catch (Error err) {
  154 + } catch (SpawnError err) {
152 155 stderr.printf(err.message);
153 156 } finally {
154 157 match_uri = null;
@@ -164,7 +167,7 @@ class taterm : Gtk.Application
164 167 var cwdlink = @"/proc/$((int)pid)/cwd";
165 168 try {
166 169 return GLib.FileUtils.read_link(cwdlink);
167   - } catch (Error err) {
  170 + } catch (FileError err) {
168 171 stderr.printf(err.message);
169 172 }
170 173 return GLib.Environment.get_home_dir();

0 comments on commit fb32032

Please sign in to comment.
Something went wrong with that request. Please try again.