Skip to content

Commit

Permalink
Fix crash when error encounterd in the 'script.nv' file
Browse files Browse the repository at this point in the history
- now catch the exception that is thrown by Sqrat if it encounters an
  error parsing script.nv

- should fix issue reported here: https://forum.attractmode.org/index.php?topic=2647.0
  • Loading branch information
mickelson committed Dec 20, 2018
1 parent cd81c92 commit 1cb3b9d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/fe_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,16 @@ namespace
temp += nv;
temp += ";";

Sqrat::Script sc;
sc.CompileString( temp );
sc.Run();
try
{
Sqrat::Script sc;
sc.CompileString( temp );
sc.Run();
}
catch ( Sqrat::Exception e )
{
FeLog() << "Error compiling " << name << " string: [" << nv << "] - " << e.Message() << std::endl;
}
}
}
};
Expand Down

0 comments on commit 1cb3b9d

Please sign in to comment.