mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Log raw load settings when parsing fails
This commit is contained in:
@@ -23,7 +23,14 @@ window.onload = function() {
|
||||
};
|
||||
|
||||
// Skip "?loadSettings=".
|
||||
var loadSettings = JSON.parse(decodeURIComponent(location.search.substr(14)));
|
||||
var rawLoadSettings = decodeURIComponent(location.search.substr(14));
|
||||
var loadSettings;
|
||||
try {
|
||||
loadSettings = JSON.parse(rawLoadSettings);
|
||||
} catch (error) {
|
||||
console.error("Failed to parse load settings: " + rawLoadSettings);
|
||||
throw error;
|
||||
}
|
||||
|
||||
// Normalize to make sure drive letter case is consistent on Windows
|
||||
process.resourcesPath = path.normalize(process.resourcesPath);
|
||||
|
||||
Reference in New Issue
Block a user