Add better error message

This commit is contained in:
2025-12-16 03:11:52 -06:00
parent bbf122a7eb
commit deb492b8c4
18 changed files with 300 additions and 20 deletions

View File

@@ -163,6 +163,19 @@ namespace Tesses::CrossLang {
}
return Undefined();
}
TObject TEnvironment::CallFunctionWithFatalError(GCList& ls, std::string key, std::vector<TObject> args)
{
ls.GetGC()->BarrierBegin();
auto res = this->GetVariable(key);
ls.GetGC()->BarrierEnd();
TCallable* callable;
if(GetObjectHeap(res,callable))
{
return callable->CallWithFatalError(ls,args);
}
return Undefined();
}
TSubEnvironment* TEnvironment::GetSubEnvironment(GCList* gc)
{
auto dict=TDictionary::Create(gc);