This modifies the panic feature to accept a boolean or a string. If true or not empty, then it will cause the panic. This makes some of the error code a little less ugly.
11 lines
231 B
Plaintext
11 lines
231 B
Plaintext
-- main.mcl --
|
|
# This should panic!
|
|
panic(true)
|
|
panic(true)
|
|
panic("please panic")
|
|
panic("please panic")
|
|
panic("please panic!")
|
|
test "hello" {}
|
|
-- OUTPUT --
|
|
# err: errStream: func `panic @ 0x0000000000` stopped before it was loaded
|