Skip to content

Commit

Permalink
fix: allow CSV read exception to propagate instead of catching it (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToddFincannon committed Jul 26, 2021
1 parent c05f2f9 commit e77b8fc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,8 @@ export let readCsv = (pathname, delimiter = ',') => {
skip_empty_lines: true,
skip_lines_with_empty_values: true
}
try {
let data = B.read(pathname)
result = parseCsv(data, CSV_PARSE_OPTS)
} catch (error) {
console.error(`ERROR: CSV file ${pathname} not found`)
}
return result
let data = B.read(pathname)
return parseCsv(data, CSV_PARSE_OPTS)
}
// Convert the var name and subscript names to canonical form separately.
export let canonicalVensimName = vname => {
Expand Down

0 comments on commit e77b8fc

Please sign in to comment.