Subj : Catch-all method To : mozilla-jseng@mozilla.org From : harryo@qiqsolutions.com (Harry Ohlsen) Date : Thu Jul 31 2003 05:22 am I'm not sure whether this is something that's in the standard definition of Javascript, but it would be helpful to me if there was a way to catch attempts to call functions that don't exist. Does Rhino have such a mechanism? By the way, I realise that I can put the call in a try/catch block, but that's not of use to me, because I'm looking for a generic way to handle this, in code written by end-users (and I don't want them to have to know this is happening). What I want to do is catch the call, so I can check whether there is a function in an external repository of scripts. If so, I would load it dynamically and re-execute the call. Hence, it would be important that the code that catches the problem is passed the list of parameters from the original, failed call. In Ruby this is handled by having a method called method_missing. I believe, in Smalltalk, it's called no_such_method. Thanks in advance, Harry O. .