GNOME Bugzilla – Bug 673521
Uncaught exception when opening a document fails
Last modified: 2012-04-16 14:28:29 UTC
When the "Open" action is activated on a document from the selection mode toolbar, or by the right click context menu in a preview, we call the open() method on a Document JS object, which in turn calls Gtk.show_uri() [1]. Since Gtk.show_uri() can fail, it should use a try/catch and not letting exceptions go uncaught if opening fails for any reason. We could also show a dialog, or error box, when that happens but for now at least catching the exception and printing an error line on the terminal will do. [1] http://git.gnome.org/browse/gnome-documents/tree/src/documents.js#n587
Created attachment 211474 [details] [review] Adds exception handling to show_uri() when opening documents
Review of attachment 211474 [details] [review]: Thanks Feroze, your patch looks good except for a minor coding style nit. ::: src/documents.js @@ +587,2 @@ open: function(screen, timestamp) { + try{ Coding style: missing space before the opening brace
I wanted to get this patch in today's 0.4.1 release, so I tweaked the coding style as in my review and pushed it to git master and gnome-3-4 branches. Thanks!