Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 8294d3f

Browse files
committed
Better error message when saving without a file
1 parent 837bcfb commit 8294d3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/text-buffer.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,7 @@ class TextBuffer
15521552

15531553
saveTo: (file) ->
15541554
if @destroyed then throw new Error("Can't save destroyed buffer")
1555-
unless file then throw new Error("Must provide a file to save")
1555+
unless file then throw new Error("Can't save a buffer with no file")
15561556

15571557
filePath = file.getPath()
15581558
if file instanceof File

0 commit comments

Comments
 (0)