🚀 change cpp standard to c++14 & add command line colorful info output.

and fix a bug that program may crash if there's an error when coroutine is running
This commit is contained in:
ValKmjolnir
2022-08-31 23:24:41 +08:00
parent 52a38709bb
commit f86ea2445f
6 changed files with 93 additions and 42 deletions
+4 -1
View File
@@ -389,7 +389,10 @@ nas_ref builtin_die(nas_ref* local,nasal_gc& gc)
nas_ref str=local[1];
if(str.type!=vm_str)
return nas_err("die","\"str\" must be string");
std::cerr<<"[vm] error: "<<str.str()<<'\n';
std::cerr<<bold_cyan<<"[vm] "
<<bold_red<<"error: "
<<bold_white<<str.str()<<'\n'
<<reset;
return {vm_none};
}
nas_ref builtin_find(nas_ref* local,nasal_gc& gc)