Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow CSV read exception to propagate instead of catching it #93

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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