uqbar-project / wollok

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

Check over MessageNotUnderstood implementation #23

Closed npasserini closed 8 years ago

npasserini commented 9 years ago

It has some implementations that might be needed for other "wollok runtime" exceptions. But the comment states it might not longer be necessary...

class MessageNotUnderstood extends WollokRuntimeException { // Esto es previo a tener la infraestructura de debugging // probablemente seria bueno unificar el manejo de errores con eso var Stack wollokStack = new Stack

new(String message) {
    super(message)
}

def pushStack(WFeatureCall call) { wollokStack.push(call) }

override getMessage() '''«super.getMessage()»
    «FOR m : wollokStack»
    «(m as WExpression).method?.declaringContext?.contextName».«(m as WExpression).method?.name»():«NodeModelUtils.findActualNodeFor(m).textRegionWithLineInformation.lineNumber»
    «ENDFOR»
'''

def getInternalMessage(){
    super.message
}

}

javierfernandes commented 8 years ago

Closing this since in v1.3.0 we have completely changed the way message not understood is implemented as part of migrating interpreter built-in code to wollok code :)