Skip to content

Instantly share code, notes, and snippets.

@pingbird
Created January 28, 2014 18:31
Show Gist options
  • Save pingbird/8673349 to your computer and use it in GitHub Desktop.
Save pingbird/8673349 to your computer and use it in GitHub Desktop.
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
@Vexatos
Copy link

Vexatos commented Jan 28, 2014

Looks cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment