anchor.diff:    }
   
     if (JS('bool', r'# instanceof TypeError', ex)) {
  -    print('In TypeError.');
       var match;
       // Using JS to give type hints to the compiler to help tree-shaking.
       // TODO(ahe): That should be unnecessary due to type inference.
  
positive.code:       if (thrownStackTrace == null) {
          JS('void', r'#.$thrownJsError = #', error, ex);
        }
      } else {
        // TODO(efortuna): Remove this branch. Added for debugging.
        if (JS('bool', "typeof window != 'undefined'") &&
            JS('bool', '# instanceof window.Error', error)) {
          var msg = JS('String', '#.message', error);
          var fileName = JS('String', '#.fileName', error);
          var lineNumber = JS('String', '#.lineNumber', error);
          print('window.Error stack: $msg $fileName $lineNumber');
        } else {
          var stack = JS('String', 'new Error().stack');
          print('Exception error stack: $stack');
        }
      }
      return error;
    }
  
    // Note that we are checking if the object has the property. If it
    // has, it could be set to null if the thrown value is null.
    if (ex == null) {
      print('Null exception');
      return null;
    }
    if (JS('bool', 'typeof # !== "object"', ex)) {
      print('Exception not an object?');
      return ex;
    }
  
    if (JS('bool', r'"dartException" in #', ex)) {
      return saveStackTrace(JS('', r'#.dartException', ex));
    } else if (!JS('bool', r'"message" in #', ex)) {
      print('Exception just has message.');
      return ex;
    }
  
  
negative.code:   // detect specific errors, so check for this first.
    if (JS('bool', '"number" in #', ex)
        && JS('bool', 'typeof #.number == "number"', ex)) {
      int number = JS('int', '#.number', ex);
  
      // From http://msdn.microsoft.com/en-us/library/ie/hc53e755(v=vs.94).aspx
  