Code:
prToRun = "wtOS/apps/lol" function runPr(prToRun) m.ccl(32768) m.tc(1) m.crp(1,1) os.pullEvent = oldpull function main() shell.run(prToRun) return end local ok, val = pcall(main) print(ok) print(val) os.pullEvent("key") --if ok then --main() --else --shell.run("wtOS/bsod "..'"'..val..'" '..prToRun) --end os.pullEvent = os.pullEventRaw m.ccl(dbg) redrawScr() return endLOL file contains:
losfmasd;fnsdlagsnfgklnadf;gdf;gknbsod file:
os.loadAPI("wtOS/apis/m") Args = { ... } m.ccl(2048) m.tc(32768) m.bc(1) m.cpr("wtOS",2) m.bc(2048) m.tc(1) m.tpr("A problem has been detected and wtOS has been terminated this program to prevent damage to your computer.",1,4) write("\n\nThe problem seems to be caused by file: \n"..Args[2]) m.tc(16384) m.cpr(Args[1],12) m.tc(1) m.cpr("Press Any Button to Continue",18) os.pullEvent("key") returnThat all works fine, but when error found, it prints ok = true... true cant be!
Please fix my error catcher.
This code is for my OS!
Edited by Thejebforge, 07 October 2014 - 05:21 PM.