Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5071)

Unified Diff: chrome/common/extensions/docs/server2/intro_data_source.py

Issue 10830252: Extensions Docs Server: Uniform handling of file not found errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/intro_data_source.py
diff --git a/chrome/common/extensions/docs/server2/intro_data_source.py b/chrome/common/extensions/docs/server2/intro_data_source.py
index c2563527b81cde4c775fc314e6989d6aa367eed1..ff983d53e20427230ad7ef0e8bf4984965e0e185 100644
--- a/chrome/common/extensions/docs/server2/intro_data_source.py
+++ b/chrome/common/extensions/docs/server2/intro_data_source.py
@@ -6,6 +6,7 @@ from HTMLParser import HTMLParser
import re
from docs_server_utils import FormatKey
+from file_system import FileNotFoundError
from third_party.handlebar import Handlebar
class _IntroParser(HTMLParser):
@@ -77,6 +78,6 @@ class IntroDataSource(object):
for base_path in self._base_paths:
try:
return self._cache.GetFromFile(base_path + '/' + real_path)
- except Exception:
+ except FileNotFoundError:
pass
return None
not at google - send to devlin 2012/08/10 06:12:16 log error before returning None?
cduvall 2012/08/10 17:25:16 Done.
not at google - send to devlin 2012/08/12 22:22:58 Like ApiListDataSource, this should only be happen
cduvall 2012/08/13 18:44:05 Done.

Powered by Google App Engine
This is Rietveld 408576698