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

Unified Diff: chrome/common/extensions/docs/server2/template_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/template_data_source.py
diff --git a/chrome/common/extensions/docs/server2/template_data_source.py b/chrome/common/extensions/docs/server2/template_data_source.py
index dcd81c4ffcccf066cc75bcfb42ccf906eefb5e60..3c36b7151fc18a8d1b40af12789570718a66376b 100644
--- a/chrome/common/extensions/docs/server2/template_data_source.py
+++ b/chrome/common/extensions/docs/server2/template_data_source.py
@@ -5,6 +5,7 @@
import logging
from docs_server_utils import FormatKey
+from file_system import FileNotFoundError
from third_party.handlebar import Handlebar
EXTENSIONS_URL = '/chrome/extensions'
@@ -125,6 +126,6 @@ class TemplateDataSource(object):
real_path = FormatKey(template_name)
try:
return self._cache.GetFromFile(base_path + '/' + real_path)
- except Exception as e:
+ except FileNotFoundError as e:
logging.error(e)
return None

Powered by Google App Engine
This is Rietveld 408576698