Print error when path is not found
authorCheng Zhao <zcbenz@gmail.com>
Tue, 14 Feb 2017 10:49:40 +0000 (19:49 +0900)
committerdeepak1556 <hop2deep@gmail.com>
Mon, 13 Mar 2017 18:56:27 +0000 (00:26 +0530)
atom/browser/ui/webui/pdf_viewer_ui.cc

index 54fcdc3..adb470a 100644 (file)
@@ -58,6 +58,9 @@ class BundledDataSource : public content::URLDataSource {
       int resource_id = entry->second;
       const ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
       callback.Run(rb.LoadDataResourceBytes(resource_id));
+    } else {
+      LOG(ERROR) << "Unable to find: " << path;
+      callback.Run(new base::RefCountedString());
     }
   }