Created
January 28, 2014 18:31
-
-
Save pingbird/8673349 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local err,res=xpcall(function() | |
end,debug.traceback) | |
if not err then | |
pcall(function() | |
res=res:gsub("\t"," ") | |
local file=io.open("system/crash.txt","w") | |
file:write(res) | |
file:close() | |
local gpu=component.gpu | |
local mx=0 | |
for m in res:gmatch("[^\n]+") do | |
mx=math.max(#m,mx) | |
end | |
gpu.setResolution(mx+2,3+#res:gsub("[^\n]","")) | |
gpu.setBackground(0x0000FF) | |
gpu.setForeground(0xFFFFFF) | |
local Mx,My=gpu.getResolution() | |
gpu.fill(1,1,Mx,My," ") | |
local cnt=2 | |
for m in res:gmatch("[^\n]+") do | |
gpu.set(2,cnt,m) | |
cnt=cnt+1 | |
end | |
os.sleep(5) | |
end)() | |
computer.shutdown() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks cool.