Skip to content

Commit 97d692d

Browse files
authored
Don't throw an error when there is a problem opening a file (#3365)
* Don't throw an error when there is a problem opening a file Anything can happen to the file that will prevent us from opening it, and the notification looks more right than an error for a average user. * Use WireLib.AddNotify * Use WireLib.AddNotify
1 parent 6579a0d commit 97d692d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/wire/client/text_editor/wire_expression2_editor.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ function Editor:LoadFile(Line, forcenewtab)
19701970

19711971
local f = file.Open(Line, "r", "DATA")
19721972
if not f then
1973-
ErrorNoHalt("Erroring opening file: " .. Line)
1973+
WireLib.AddNotify("Erroring opening file: " .. Line, NOTIFY_ERROR, 5, NOTIFYSOUND_ERROR1)
19741974
else
19751975
local str = f:Read(f:Size()) or ""
19761976
f:Close()

0 commit comments

Comments
 (0)