Permalink
Browse files

Updating error messages.

  • Loading branch information...
1 parent cc96782 commit 2fc44045e1bb8c247a37615899f74e5167c6742a @andrerod andrerod committed Oct 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/services/core/connectionstringparser.js
View
4 lib/services/core/connectionstringparser.js
@@ -145,7 +145,7 @@ ConnectionStringParser.prototype._extractString = function (quote) {
if (this._pos === this._value.length) {
// Runaway string.
- throw new Error('Invalid string');
+ throw new Error('Unterminated string starting at position ' + firstPos);
}
return this._value.substring(firstPos, this._pos++);
@@ -159,7 +159,7 @@ ConnectionStringParser.prototype._extractString = function (quote) {
ConnectionStringParser.prototype._skipOperator = function (operatorChar) {
if (this._value[this._pos] != operatorChar) {
// Character was expected.
- throw new Error('Character not expected ' + operatorChar);
+ throw new Error('expecting ' + operatorChar + ' but instead got ' + currentChar + ' at position ' + this._pos);
}
this._pos++;

0 comments on commit 2fc4404

Please sign in to comment.