- changed title to Processing not reporting line # of error in Handlers
Processing not reporting line # of error in Handlers
Processing handlers aren't reporting what line the exception was thrown:
Done Error in onLoop: expected float, got builtin_function_or_method loop is now stopping.
from Processing import *
window(500, 500)
def draw():
background(0)
ellipse(mouseX, mouseY, 50, 50)
onLoop += draw
loop()
Comments (7)
-
reporter -
I'm not sure that we can get stack trace, but we can give a better error message if we allow "object" to be passed in, and then check the types. Then we could give the error:
Error in calling ellipse: expected float, got builtin_function_or_method
That would be a lot of work to do that for all methods and would result in some overhead.
Maybe we can examine the exception better though, and give a better trace. It would have to work for all languages though.
-
reporter Could we throw a particular exception the DLR runtime could then handle and report the line #?
-
Ah, yes... that is what I do in the simulation code. I'll take a look.
-
I don't think we can get a stack trace. I think we could, however, get the error message above by changing either IronPython or the DLR code. It should report the name of the function that it is trying to run.
-
- removed responsible
-
- changed status to wontfix
We'd have to rewrite stuff to better handle this, and it is a limitation of IronPython.
- Log in to comment