Throw a useful error message when an .arcconfig file is not valid JSON.
Depends on D9697.
Differential D9681
Better handling of `.arcconfig` files. joshuaspence on Jun 23 2014, 4:05 AM. Authored by Tags None Referenced Files
Subscribers
Details
Throw a useful error message when an .arcconfig file is not valid JSON. Depends on D9697. Modified an .arcconfig file to be invalid JSON. > arc lint Usage Exception: Your '~/.arcrc' file is not a valid JSON file. Parse error on line 18 at column 4: Expected: 'STRING' - It appears you have an extra trailing comma
Diff Detail
Event TimelineComment Actions Maybe worth considering PhutilProxyException or introducing some UsageProxyException. Not sure how nasty the PhutilProxyException output is. Comment Actions Since updating to this revision, I get this error: $ arc linters Exception Failed to parse '.../site/.git/arc/config' as JSON. Parse error on line 1 at column 0: Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[' (Run with --trace for a full exception trace.) And that's because: $ cat .git/arc/config {} Should an empty .git/arc/config really be an error? I think arc made that itself at some point. |