cosmopolitan/tool/net/demo/crashreport.lua
Justine Tunney 2046c0d2ae Make improvements
- Expand redbean UNIX module
- Expand redbean documentation
- Ensure Lua copyright is embedded in binary
- Increase the PATH_MAX limit especially on NT
- Use column major sorting for linenoise completions
- Fix some suboptimalities in redbean's new UNIX API
- Figured out right flags for Multics newline in raw mode
2022-04-24 10:06:05 -07:00

28 lines
422 B
Lua

globalvar1 = 31337
globalvar2 = {
hello = 'world',
}
function dosomething(param1, x)
local res
local y
y = 0
SetStatus(200)
SetHeader('Content-Type', 'text/plain; charset=utf-8')
Write('preprae to crash... now\r\n')
res = x / y
Write('42 / 0 is %d\r\n' % {res})
end
function start(param1)
local x = 42
dosomething(s, x)
end
function main()
local s = 'hello'
start(s)
end
main()