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

Unified Diff: chrome/common/extensions/docs/server2/api_list_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/api_list_data_source.py
diff --git a/chrome/common/extensions/docs/server2/api_list_data_source.py b/chrome/common/extensions/docs/server2/api_list_data_source.py
index 5fd607ecaed02b6bc746e9a4b1c30f802f30cf94..e65cdadcfa34f142399b1e4babfbfd6dcd004926 100644
--- a/chrome/common/extensions/docs/server2/api_list_data_source.py
+++ b/chrome/common/extensions/docs/server2/api_list_data_source.py
@@ -4,6 +4,7 @@
import os
+from file_system import FileNotFoundError
import third_party.json_schema_compiler.model as model
from docs_server_utils import SanitizeAPIName
@@ -52,5 +53,5 @@ class APIListDataSource(object):
def get(self, key):
try:
return self._cache.GetFromFileListing(self._api_path)[key]
- except Exception as e:
+ except FileNotFoundError:
not at google - send to devlin 2012/08/10 06:12:16 log error?
cduvall 2012/08/10 17:25:16 Done.
not at google - send to devlin 2012/08/12 22:22:58 By the same logic as ApiDataSource we shouldn't ca
cduvall 2012/08/13 18:44:05 Used the error as a string plus a more specific me
return None

Powered by Google App Engine
This is Rietveld 408576698