prevent most of caught exceptions when loading ide

pull/85/head^2
nightwing 2015-05-06 02:51:22 +04:00
rodzic 876eb083bc
commit 5913d69152
3 zmienionych plików z 7 dodań i 18 usunięć

Wyświetl plik

@ -56,7 +56,7 @@
"c9.ide.language.html.diff": "#a7311cfc9f", "c9.ide.language.html.diff": "#a7311cfc9f",
"c9.ide.language.javascript": "#8479d0a9c1", "c9.ide.language.javascript": "#8479d0a9c1",
"c9.ide.language.javascript.immediate": "#9a2cce9121", "c9.ide.language.javascript.immediate": "#9a2cce9121",
"c9.ide.language.javascript.eslint": "#129a16dafb", "c9.ide.language.javascript.eslint": "#2db744b1a3",
"c9.ide.language.javascript.tern": "#7aab8b0b6a", "c9.ide.language.javascript.tern": "#7aab8b0b6a",
"c9.ide.language.javascript.infer": "#cfec494a3c", "c9.ide.language.javascript.infer": "#cfec494a3c",
"c9.ide.language.jsonalyzer": "#dab3edfca5", "c9.ide.language.jsonalyzer": "#dab3edfca5",
@ -72,7 +72,7 @@
"c9.ide.ace.keymaps": "#43445d6306", "c9.ide.ace.keymaps": "#43445d6306",
"c9.ide.ace.repl": "#ada99852fa", "c9.ide.ace.repl": "#ada99852fa",
"c9.ide.ace.split": "#0ae0151c78", "c9.ide.ace.split": "#0ae0151c78",
"c9.ide.ace.statusbar": "#d7b45bb7c3", "c9.ide.ace.statusbar": "#d95be89d53",
"c9.ide.ace.stripws": "#cf0f42ac59", "c9.ide.ace.stripws": "#cf0f42ac59",
"c9.ide.behaviors": "#6aad7006a0", "c9.ide.behaviors": "#6aad7006a0",
"c9.ide.closeconfirmation": "#a28bfd8272", "c9.ide.closeconfirmation": "#a28bfd8272",

Wyświetl plik

@ -429,7 +429,7 @@ define(function(require, exports, module) {
return JSON.parse(JSON.stringify(json)); return JSON.parse(JSON.stringify(json));
try { try {
var obj = JSON.parse(json); var obj = json && JSON.parse(json);
return obj; return obj;
} }
catch (e) { catch (e) {

Wyświetl plik

@ -142,22 +142,11 @@ define(function(require, exports, module) {
function setTheme(path, isPreview, fromServer, $err) { function setTheme(path, isPreview, fromServer, $err) {
// Get Theme or wait for theme to load // Get Theme or wait for theme to load
try { theme = fromServer;
theme = typeof path == "object" if (!theme) {
? path return $err || config.loadModule(path, function(m) {
: fromServer || require(path); setTheme(path, isPreview, m, true);
// fixes a problem with Ace architect loading /lib/ace
// creating a conflict with themes
if (!theme || theme.isDark === undefined)
throw new Error();
}
catch (e) {
// not checking this can create infinite loop in build
$err || require([path], function(){
setTheme(path, isPreview, fromServer, true);
}); });
return;
} }
if (!isPreview) { if (!isPreview) {