Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

exception handling

throwing exception instead of emitting error. Added error event.

Signed-off-by: DominicBoettger <Dominic.Boettger@inspirationlabs.com>
  • Loading branch information...
commit 73013a824cba7b31a583f42c19e8dc25c1ccafe1 1 parent 7b56213
DominicBoettger DominicBoettger authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/ya-csv.js
2  lib/ya-csv.js
View
@@ -128,7 +128,7 @@ CsvReader.prototype.parse = function(data) {
// closing quote should be followed by separator unless the nested quotes option is set
var nextChar = data.charAt(i + 1);
if (nextChar && nextChar != '\r' && nextChar != '\n' && nextChar !== this.separator && this.nestedQuotes != true) {
- throw new Error("separator expected after a closing quote; found " + nextChar);
+ this.emit('error', new Error("separator expected after a closing quote; found " + nextChar);
} else {
ps.quotedField = false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.