function create3DContextWithWrapperThatThrowsOnGLError(canvas) {
  var context = create3DContext(canvas);
  var wrap = {};
  for (var i in context) {
    try {
      if (typeof context[i] == 'function') {
        wrap[i] = createGLErrorWrapper(context, i);
      } else {
        wrap[i] = context[i];
      }
    } catch (e) {
      error("createContextWrapperThatThrowsOnGLError: Error accessing " + i);
    }
  }
  wrap.getError = function() {
      return context.getError();
  };
  return wrap;
}
/**
 * Creates a WebGL context where all functions are wrapped to throw an exception
 * if there is an error.
 * @param {!Canvas} canvas The HTML canvas to get a context from.
 * @return {!Object} The wrapped context.
 */
Creates a WebGL context where all functions are wrapped to throw an exception
if there is an error.
@param {!Canvas} canvas The HTML canvas to get a context from.
@return {!Object} The wrapped context.
Creates a WebGL context where all functions are wrapped to throw an exception if there is an error . @param { !Canvas } canvas The HTML canvas to get a context from . @return { !Object } The wrapped context .
function create3DContextWithWrapperThatThrowsOnGLError(canvas) {
  var context = create3DContext(canvas);
  var wrap = {};
  for (var i in context) {
    try {
      if (typeof context[i] == 'function') {
        wrap[i] = createGLErrorWrapper(context, i);
      } else {
        wrap[i] = context[i];
      }
    } catch (e) {
      error("createContextWrapperThatThrowsOnGLError: Error accessing " + i);
    }
  }
  wrap.getError = function() {
      return context.getError();
  };
  return wrap;
}
function create3DContextWithWrapperThatThrowsOnGLError ( canvas ) { var context = create3DContext ( canvas ) ; var wrap = { } ; for ( var i in context ) { try { if ( typeof context [ i ] == 'function' ) { wrap [ i ] = createGLErrorWrapper ( context , i ) ; } else { wrap [ i ] = context [ i ] ; } } catch ( e ) { error ( "createContextWrapperThatThrowsOnGLError: Error accessing " + i ) ; } } wrap . getError = function ( ) { return context . getError ( ) ; } ; return wrap ; }
Creates a WebGL context where all functions are wrapped to throw an exception
 if there is an error.
Creates a WebGL context where all functions are wrapped to throw an exception if there is an error .