Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederickGeek8 committed Jul 18, 2017
1 parent cf5474e commit 7a1dcba
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/package-converter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ class PackageConverter
extension = path.extname(child)
name = path.basename(child, extension)

selector = new ScopeSelector(scope).toCssSelector() if scope
try
selector = new ScopeSelector(scope).toCssSelector() if scope
catch e
e.fileName = path.join(sourceSnippets, child)
e.message = "In file " + e.fileName + " at " + JSON.stringify(scope) + ": " + e.message
throw e
selector ?= '*'

snippetsBySelector[selector] ?= {}
Expand All @@ -184,7 +189,12 @@ class PackageConverter
continue unless scope and settings

if properties = @convertSettings(settings)
selector = new ScopeSelector(scope).toCssSelector()
try
selector = new ScopeSelector(scope).toCssSelector()
catch e
e.fileName = path.join(sourcePreferences, child)
e.message = "In file " + e.fileName + " at " + JSON.stringify(scope) + ": " + e.message
throw e
for key, value of properties
preferencesBySelector[selector] ?= {}
if preferencesBySelector[selector][key]?
Expand Down

0 comments on commit 7a1dcba

Please sign in to comment.