Skip to content

Commit

Permalink
fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kalyazin committed Apr 24, 2014
1 parent f953adf commit 747e547
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cscope.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ genericFind = (cmd, symbol, options, callback) ->
.run (err, stdout, exitcode) ->
if err
console.log "could not invoke cscope (#{err})"
process.exit 1
callback null
return

header = stdout[1].match(cscopeRegex)
lines = parseInt(header[1])
if lines == 0 # no such symbol
return null
callback []
return

startIdx = 2
res = []
Expand Down

0 comments on commit 747e547

Please sign in to comment.