uqbar-project / wollok

Wollok Programming Language
GNU General Public License v3.0
60 stars 16 forks source link

Model MessageNotUnderstood exception in wollok itself #429

Closed javierfernandes closed 9 years ago

javierfernandes commented 9 years ago

We need to model it as a regular wollok Exception

npasserini commented 9 years ago

Why?

On Mon, Nov 16, 2015 at 11:52 PM, javierfernandes notifications@github.com wrote:

We need to model it as a regular wollok Exception

— Reply to this email directly or view it on GitHub https://github.com/uqbar-project/wollok/issues/429.

javierfernandes commented 9 years ago

Ok, maybe it was not 100% necessary :P But it will simplify the interpreter to have it modeled as another regular wollok exception, and reuse the same code that shows an exception. I guess it is "elegant" in the sense that the interpreter should be easier.

I'm not doing it to have a dynamic programming model. I'll prefer to have a simpler type system and not dynamic facilities. I guess that we can limit this method to avoid dynamic objects and therefore make the type system easier.

javierfernandes commented 9 years ago

Sample outputs:

wollok.lang.MessageNotUnderstoodException: a AsustadorNato[nivelMotivacion=100, edad=25, puntosTerrorInnatos=200] does not understand cantina()
    at wollok.lang.Object.messageNotUnderstood(name,parameters) [/wollok.wlk:151]
    at  [/workspace.wpgm:23]
screen shot 2015-11-17 at 00 22 29 screen shot 2015-11-17 at 00 33 01