mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Catch error
This commit is contained in:
@@ -180,13 +180,12 @@ class Package
|
||||
grammarsDirPath = path.join(@path, 'grammars')
|
||||
grammarPaths = fs.listSync(grammarsDirPath, ['json', 'cson'])
|
||||
for grammarPath in grammarPaths
|
||||
console.log 'load sync', grammarPath
|
||||
try
|
||||
grammar = atom.syntax.readGrammarSync(grammarPath)
|
||||
grammar.packageName = @name
|
||||
@grammars.push(grammar)
|
||||
grammar.activate()
|
||||
catch
|
||||
catch error
|
||||
console.warn("Failed to load grammar: #{grammarPath}", error.stack ? error)
|
||||
|
||||
@grammarsLoaded = true
|
||||
|
||||
Reference in New Issue
Block a user