Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local BSOD = function(errorMSG,filename)
- term.setBackgroundColor(colors.black)
- term.clear()
- sleep(1)
- if term.isColor() then
- term.setBackgroundColor(colors.blue)
- else
- if _VERSION then
- term.setBackgroundColor(colors.gray)
- else
- term.setBackgroundColor(colors.black)
- end
- end
- term.setTextColor(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- print("A problem has been detected and CraftOS has shut down to prevent further damage to your computer.\n")
- print("The problem seems to be caused by the following file: "..errorMSG.."\n")
- print("If this is the first time you've seen this stop error screen, restart your computer. If this screen appears again, follow these steps:")
- print("Check to make sure any new hardware or software is properly installed. If this is a new installation, ask your hardware or software manufacturer for any CraftOS updates you need.\n")
- print("Technical Information:")
- print("*** STOP 0x000000e2 (0x00000000, 0x00000000, 0x00000000, 0x00000000)")
- write("*** "..filename.." - Address 0x94efd1aa base at 0x94efb000 DateStamp 0x4a5bc705")
- sleep(0.5)
- os.pullEvent("key")
- os.reboot()
- end
- local badFunction = function(boop)
- if #boop > 0 then
- dofile(table.concat(boop," "))
- else
- error("What an almighty idiot!")
- end
- end
- local tArg = {...}
- local status, result = pcall(badFunction, tArg)
- if not status then
- BSOD(result,fs.getName(shell.getRunningProgram()))
- end
- print("Okey day")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement