mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
📝 Add docs
This commit is contained in:
@@ -18,6 +18,10 @@ ChildProcess = require 'child_process'
|
||||
# ```
|
||||
module.exports =
|
||||
class BufferedProcess
|
||||
###
|
||||
Section: Construction
|
||||
###
|
||||
|
||||
# Public: Runs the given command by spawning a new child process.
|
||||
#
|
||||
# * `options` An {Object} with the following keys:
|
||||
@@ -105,9 +109,21 @@ class BufferedProcess
|
||||
e.name = 'BufferedProcessError'
|
||||
throw e
|
||||
|
||||
###
|
||||
Section: Event Subscription
|
||||
###
|
||||
|
||||
# Public: Will call your callback when an error is raised by the process.
|
||||
# Usually this is due to the command not being available or not on the PATH.
|
||||
#
|
||||
# Returns a {Disposable}
|
||||
onDidThrowError: (callback) ->
|
||||
@emitter.on 'did-throw-error', callback
|
||||
|
||||
###
|
||||
Section: Helper Methods
|
||||
###
|
||||
|
||||
# Helper method to pass data line by line.
|
||||
#
|
||||
# * `stream` The Stream to read from.
|
||||
|
||||
Reference in New Issue
Block a user