if a method throws an exception, then the code that resets the supr property does not get executed and therefore the this.supr poperty is out of sync. Consider a situation like this:
var Super = klass({
throwing: function() { throw new Exception(); },
catching: function() {}
};
var Sub = Super.extend({
throwing: function() { this.supr() },
catching: function() {
try {
this.throwing()
} catch() {
this.supr()
}
}
}
Here the supr() call in catching will actually call throwing again.
Hi there,
if a method throws an exception, then the code that resets the supr property does not get executed and therefore the this.supr poperty is out of sync. Consider a situation like this:
var Super = klass({ throwing: function() { throw new Exception(); }, catching: function() {} }; var Sub = Super.extend({ throwing: function() { this.supr() }, catching: function() { try { this.throwing() } catch() { this.supr() } } }
Here the supr() call in catching will actually call throwing again.