Skip to content

Commit

Permalink
Merge pull request #3 from adamnbowen/error
Browse files Browse the repository at this point in the history
Throw Errors instead of logging to console
  • Loading branch information
shinypb committed Oct 15, 2012
2 parents 206f556 + f234b4a commit baa9a62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.rm.js
Expand Up @@ -101,14 +101,14 @@
return;
} else if(this.length != 1) {
// Too many elements
console.log("responsiveMeasure must be applied with a selector that matches only one element.");
throw new Error("responsiveMeasure must be applied with a selector that matches only one element.");
return;
}

var $element = this;
var idealLineLength = typeof(opts.idealLineLength) == 'function' ? opts.idealLineLength.call(this, $element) : parseInt(opts.idealLineLength, 10);
if (idealLineLength == 0) {
console.warn("responsiveMeasure was given an ideal line length of 0; this doesn't make any sense. Doing nothing.");
throw new Error("responsiveMeasure was given an ideal line length of 0; this doesn't make any sense. Doing nothing.");
return;
}

Expand Down

0 comments on commit baa9a62

Please sign in to comment.