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

Unified Diff: chrome/browser/resources/device_log_ui/device_log_ui.js

Issue 1643513002: Catch exception when creating device log entries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added No log entries to container Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/device_log_ui/device_log_ui.js
diff --git a/chrome/browser/resources/device_log_ui/device_log_ui.js b/chrome/browser/resources/device_log_ui/device_log_ui.js
index a562ed7eddbd1d0efcabca85aa895c1fa8181c0e..acee79aa41d603abe20b08884e5828d4adce4f97 100644
--- a/chrome/browser/resources/device_log_ui/device_log_ui.js
+++ b/chrome/browser/resources/device_log_ui/device_log_ui.js
@@ -95,7 +95,12 @@ var DeviceLogUI = (function() {
* @param {Object} data A JSON structure of event log entries.
*/
var getLogCallback = function(data) {
- createEventLog(JSON.parse(data));
+ try {
+ createEventLog(JSON.parse(data));
+ } catch(e) {
+ var container = $('log-container');
+ container.textContent = 'No log entries';
+ }
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698