Catch error

This commit is contained in:
Kevin Sawicki
2014-06-23 16:04:25 -07:00
parent 0304f187dd
commit e76b24f8ad

View File

@@ -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