title: Catch $.getJSON error
body: <p>I've been trying to figure this out for hours.  I have a DYNAMIC youtube search, which I use Youtube's JSON api for.  It works usually, but there are times that it won't find anything.  Is there a way to figure out if it finds nothing, and then end the function because otherwise it stops the entire code.  I tried jsonp, but that didn't seem to be correct.  Somewhere I read that error catching is built into the newest jQuery getJSON, but I couldn't find it.</p>
  
  <p>The code is really tedious so I'd rather not post it unless it comes to that.  I'd appreciate any help!  Thanks guys.</p>
  
  <p>error showing that json didn't return anything</p>
  
  <p>jquery-1.4.4.min.js:32 TypeError: Result of expression 'j' [undefined] is not an object.</p>
  
  <p><a href="http://pastebin.com/4rVjAUwa" rel="nofollow">http://pastebin.com/4rVjAUwa</a></p>