title: javascript: how to catch any missing functions/properties for an object
body: <pre><code>Preferences = {
   XDPI:90,
   YDPI:90,
   *:function(missing_name) {"Tell Joe he forgot to implement " + missing_name+ " property or func"}
  }
  </code></pre>
  
  <p>Say I got an old/undocumented/minified/uglified class I want to replace with my own implementation.
  How could I catch all the old properties that could be missing from within my new "object" ?.</p>
  
  <p>(Say there are a lot of client script (macros) used by non-technical users. I want to ease the report of missing func)</p>
  
  <p>E.g if a script call <code>Preferences.CurrentPrinter</code> I want the Preferences object to diagnose it lacks a CurrentPrinter property without the user having to look at the console</p>