title: How can you bubble up errors so they can be caught in the same try/catch block?
body: <p>I've got an object with functions that throw errors,</p>
  
  <pre><code>myObj = {
    ini:function(){
      this.f();
    },
    f:function(){
     throw new Error();
    } 
  };
  </code></pre>
  
  <p>but I only want to catch the exceptions where the object is created</p>
  
  <pre><code>try{
    var o = new myObj();
  }catch(err){
    alert("error!");
  }
  </code></pre>
  
  <p>it looks like i have to have try/catch blocks everywhere =/ to capture the error event in different function scopes</p>
  
  <pre><code>try{
      myObj = {
        ini:function(){
          try{
            this.f();
          }catch(err){
           alert("f threw an err");
          }
        },
        f:function(){
         throw new Error();
        } 
      };
  }catch(err){
   alert("error happend while crating Obj");
  }
  </code></pre>
  
  <p>But I only want to capture from one place =/ How do I do this?</p>