mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Throw when editor dependencies are undefined
This commit is contained in:
@@ -90,6 +90,12 @@ class TextEditor extends Model
|
||||
@viewRegistry, @project
|
||||
} = params
|
||||
|
||||
throw new Error("Must pass a config parameter when constructing TextEditors") unless @config?
|
||||
throw new Error("Must pass a notificationManager parameter when constructing TextEditors") unless @notificationManager?
|
||||
throw new Error("Must pass a clipboard parameter when constructing TextEditors") unless @clipboard?
|
||||
throw new Error("Must pass a viewRegistry parameter when constructing TextEditors") unless @viewRegistry?
|
||||
throw new Error("Must pass a project parameter when constructing TextEditors") unless @project?
|
||||
|
||||
@emitter = new Emitter
|
||||
@disposables = new CompositeDisposable
|
||||
@cursors = []
|
||||
|
||||
Reference in New Issue
Block a user