chore: Include parse error message in error

This commit is contained in:
Nick Darvey 2022-01-20 16:38:35 +11:00 committed by GitHub
parent 8f35b71651
commit 853c0006ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ export async function getRCFileVars (
parsedData = JSON.parse(file)
}
} catch (e) {
const parseError = new Error(`Failed to parse .rc file at path: ${absolutePath}`)
const parseError = new Error(`Failed to parse .rc file at path: ${absolutePath}.\n${e.message}`)
parseError.name = 'ParseError'
throw parseError
}