diff --git a/spec/project-spec.coffee b/spec/project-spec.coffee index 930b4a849..5ff1b2df3 100644 --- a/spec/project-spec.coffee +++ b/spec/project-spec.coffee @@ -60,15 +60,18 @@ describe "Project", -> it "creates a warning notification", -> atom.notifications.onDidAddNotification noteSpy = jasmine.createSpy() + error = new Error('SomeError') + error.eventType = 'resurrect' editor.buffer.emitter.emit 'will-throw-watch-error', handle: jasmine.createSpy() - error: new Error('SomeError') + error: error expect(noteSpy).toHaveBeenCalled() notification = noteSpy.mostRecentCall.args[0] expect(notification.getType()).toBe 'warning' expect(notification.getDetail()).toBe 'SomeError' + expect(notification.getMessage()).toContain '`resurrect`' describe ".open(path)", -> [absolutePath, newBufferHandler] = [] diff --git a/src/project.coffee b/src/project.coffee index 0c2496ca6..c6d2ea34c 100644 --- a/src/project.coffee +++ b/src/project.coffee @@ -337,8 +337,8 @@ class Project extends Model buffer.onWillThrowWatchError ({error, handle}) => handle() atom.notifications.addWarning """ - Unable to read file after file change event. - Make sure you have permission to access the file. + Unable to read file after file `#{error.eventType}` event. + Make sure you have permission to access `#{@getPath()}`. """, detail: error.message dismissable: true