File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -347,3 +347,4 @@ healthchecksdb
347347/script.srp
348348/temp.txt
349349/CustomShell /scriptInterpreter
350+ /script.rls
Original file line number Diff line number Diff line change @@ -70,11 +70,23 @@ private void ReadScriptFile(string filePath)
7070 filePath = main . GetPathType ( filePath ) ;
7171
7272 if ( ! filePath . EndsWith ( ".rls" ) )
73+ {
74+ main . AddTextToConsole ( "Not a .rls file..." ) ;
75+ return ;
76+ }
77+
78+ try
79+ {
80+ lines = File . ReadAllLines ( filePath ) ;
81+ file = File . ReadAllLines ( filePath ) ;
82+ CreateTokens ( ) ;
83+ }
84+ catch ( Exception )
85+ {
86+ main . AddTextToConsole ( "File could not be found..." ) ;
7387 return ;
88+ }
7489
75- lines = File . ReadAllLines ( filePath ) ;
76- file = File . ReadAllLines ( filePath ) ;
77- CreateTokens ( ) ;
7890 }
7991
8092 private void CreateTokens ( )
You can’t perform that action at this time.
0 commit comments