Closed asanzo closed 8 years ago
This has been addressed in the last weeks for Wollok 1.3
See here https://github.com/uqbar-project/wollok/issues/429
You can try it out by installing the latest "dev" version or updating by using the update site:
True, message not understood now it's detected before test run.
But other execution errors still get unexplained. For example, a divide by zero still gets "Error evaluating line"
org.uqbar.project.wollok.interpreter.WollokInterpreterException: Error evaluating line file:/opt/wollok/workspace/SuperSmashBros/src/testsSmashBros.wtest:[7]: assert.equals(cpnFalcon.potencialOfensivo(),9999/0)
Cool, good point ! I believe in that particular case we are talking about exception propagation for native objects (the / op in integers). I'll fix that. This is part of a really big refactor we are doing right now to isolate wollok from java (interpreter)
Fixed in dev !
Now if a native method (like integer's methods or collections, etc) throw a java exception wollok will convert it automatically to a wollok.lang.Exception and throw it through the wollok exception handling mechanism, so you will actually be able to catch it if you want. But if you don't it means that it will be shown as any other wollok exception.
For example in your case it will show something like this
wollok.lang.Exception: / by zero
at [/wollok.wlk:408]
at [__synthetic0.wpgm]
El error para cuando no se entiende un mensaje:
Es igual a un error aritmético:
¿Podría tener un stacktrace diferente? Lo único que me sirve de todo eso es la línea donde ocurrió el error....