monome / maiden

web based editor and repl for norns
GNU General Public License v3.0
47 stars 33 forks source link

provide more info on script errors #82

Closed pq closed 6 years ago

pq commented 6 years ago

currently (at least some) script errors provide very little information to the REPL (e.g., ### SCRIPT ERROR and nothing more). if we're trapping the error it'd be great to pass more back (in the repl or log).

a few observations:

to reproduce, put this into an init() and play:

local a = nil
print(a.tostring())

result:

# script run
# script init
### SCRIPT ERROR:
pq commented 6 years ago

/cc @catfact

catfact commented 6 years ago

norns.scripterror() is called with no arguments here: https://github.com/catfact/norns/blob/dev/lua/script.lua#L41

this should probably use norns.try (as far as i can tell)

this functionality seems messy and error-prone to me - interdependency on script.lua, menu.lua and norns.lua

ngwese commented 6 years ago

i think this would be better filed against matron in the norns repo - maiden has no control over this as the repl is just echos whatever is sent over the socket

pq commented 6 years ago

@catfact should this get moved to the norns repo?

catfact commented 6 years ago

yes i agree

catfact commented 6 years ago

this stuff is also printed to the norns screen... sometimes? maybe?

pq commented 6 years ago

This issue was moved to catfact/norns#358