mirror of
https://onedev.site.tesses.net/crosslang
synced 2026-02-09 01:25:45 +00:00
Add dvd builder script
This commit is contained in:
@@ -208,6 +208,7 @@ namespace Tesses::CrossLang {
|
||||
this->marked = true;
|
||||
this->dict->Mark();
|
||||
for(auto defer : this->defers) defer->Mark();
|
||||
if(this->error != nullptr) this->error->Mark();
|
||||
}
|
||||
TRootEnvironment* TRootEnvironment::Create(GCList* gc,TDictionary* dict)
|
||||
{
|
||||
@@ -225,4 +226,39 @@ namespace Tesses::CrossLang {
|
||||
_gc->Watch(env);
|
||||
return env;
|
||||
}
|
||||
};
|
||||
|
||||
bool TRootEnvironment::HandleException(GC* gc,TEnvironment* env, TObject err)
|
||||
{
|
||||
if(error != nullptr)
|
||||
{
|
||||
GCList ls(gc);
|
||||
return ToBool(error->Call(ls, {
|
||||
TDictionary::Create(ls,{
|
||||
TDItem("IsBreakpoint",false),
|
||||
TDItem("Exception",err),
|
||||
TDItem("Environment", env)
|
||||
})
|
||||
}));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool TRootEnvironment::HandleBreakpoint(GC* gc,TEnvironment* env, TObject err)
|
||||
{
|
||||
if(error != nullptr)
|
||||
{
|
||||
GCList ls(gc);
|
||||
return ToBool(error->Call(ls, {
|
||||
TDictionary::Create(ls,{
|
||||
TDItem("IsBreakpoint",true),
|
||||
TDItem("Breakpoint",err),
|
||||
TDItem("Environment", env)
|
||||
})
|
||||
}));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void TRootEnvironment::RegisterOnError(TCallable* call)
|
||||
{
|
||||
this->error = call;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user