app/scripts/webcam.js
function onFailure(err) {
          _removeDOMElement(placeholder);
          if (console && console.debug) {
            console.debug('The following error occured: ', err);
          }

          /* Call custom callback */
          if ($scope.onError) {
            $scope.onError({err:err});
          }

          return;
        }
function onFailure(err) {
          _removeDOMElement(placeholder);
          if (console && console.debug) {
            console.debug('The following error occured: ', err);
          }

          /* Call custom callback */
          if ($scope.onError) {
            $scope.onError({err:err});
          }

          return;
        }
function onFailure ( err ) { _removeDOMElement ( placeholder ) ; if ( console && console . debug ) { console . debug ( 'The following error occured: ' , err ) ; } /* Call custom callback */ if ( $scope . onError ) { $scope . onError ( { err : err } ) ; } return ; }
called when any error happens
called when any error happens