Skip to content

Commit

Permalink
Adjust unknown coding mode from drop -> force manual
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechurch committed Sep 20, 2018
1 parent 5a789df commit 7639e37
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions coda-prototype/src/io/FileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FileUtils {

// For each 'event', add a row to the output for each scheme if schemes exist, or a single row if not.
// TODO: Write this in a less-yucky way such that pushing many empty strings is not required
let dropped_data = 0
let coding_mode_overwritten = 0
for (let event of dataset.eventsInSortOrder) {
if (dataset.schemeCount === 0) {
let newEventData = [];
Expand Down Expand Up @@ -96,8 +96,9 @@ class FileUtils {
newEventData.push("manual");
break;
default:
dropped_data = dropped_data + 1
continue;
newEventData.push("manual");
coding_mode_overwritten = coding_mode_overwritten + 1
break;
// throw "Unknown CodingMode: " + decoration.codingMode;
}

Expand Down Expand Up @@ -130,8 +131,8 @@ class FileUtils {
});
});

if (dropped_data > 0) {
console.warn("Data with unknown coding mode was dropped " + dropped_data)
if (coding_mode_overwritten > 0) {
console.warn("Data with unknown coding mode was forced manual, count: " + coding_mode_overwritten)
}

}
Expand Down

0 comments on commit 7639e37

Please sign in to comment.