Possible false ahead exception?

10 views
Skip to first unread message

Fernando Ariel Niwes Naufal

unread,
Jul 28, 2013, 2:20:33 PM7/28/13
to fir...@googlegroups.com
It is weird, I do not know how to describe my problem. Basically I have the following code:

    Tablero.prototype.getValor = function() {
      if (!this.hayFichas()) {
        console.trace();
        throw "The deck is empty. It is illegal to call getValor()";
      }
... more code ...
}

The program works without trouble. But I keep seeing in Firebug's Console the exception. (The deck is empty...)
If I use Firefox's built-in  Developer Tools, or Chrome, there is never a exception. It only appears on Firebug Console.

I added a breakpoint over the exception and it never stops. It is like never going that path. But still the exception appears.
That code fragment is part of a more complex code, that uses Knockoutjs, jQuery, SignalR, and I don't know what more.

What I think is that Firefox have some kind of prediction algorithm that execute that branch before time, and if it ever goes there it is already processed. But as it never goes that branch... it is a exception that is never thrown. Even worse.. the console.trace()  is never shown on console ! As it was never executed.

Am I right? Is it possible? Am I missing something?
I am using Firefox 22.0 with Firebug 1.11.4

It have no consequences on my application, but it is very annoying to always see a exception that for all effects... do not exists.

Sebastian Zartner

unread,
Jul 29, 2013, 2:19:11 AM7/29/13
to fir...@googlegroups.com
First of all you should try out Firebug 1.12b5 and check if the problem is still present.
If it's still there, could you please provide a test case, so we can reproduce that?

Sebastian
Reply all
Reply to author
Forward
0 new messages