//https://github.com/albertodemichelis/squirrel/blob/master/sqstdlib/sqstdaux.cpphttps://bitbucket.org/stormeus/vl8-pb400/src/master/LibErrors.nutfunctionerrorHandling(err){localstackInfos=getstackinfos(2);if(stackInfos){locallocals="";foreach(index,valueinstackInfos.locals){if(index!="this")locals=locals+"["+index+"] "+value+"\n";}localcallStacks="";locallevel=2;do{callStacks+="*FUNCTION ["+stackInfos.func+"()] "+stackInfos.src+" line ["+stackInfos.line+"]\n";level++;}while((stackInfos=getstackinfos(level)));localerrorMsg="AN ERROR HAS OCCURRED ["+err+"]\n";errorMsg+="\nCALLSTACK\n";errorMsg+=callStacks;errorMsg+="\nLOCALS\n";errorMsg+=locals;Console.Print(errorMsg);}}seterrorhandler(errorHandling);
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.