Currently, yaml2macho doesn't support error handling. This patch helps improve it.
Perhaps invalid_argument instead of inconvertibleErrorCode()?
Here and elsewhere, I don't think you need an assertion if you are reporting an error too.
|1 ↗||(On Diff #266105)|
I think these two test cases should each be in their own file, rather than a generic "errors" test file.
|15 ↗||(On Diff #266105)|
Perhaps worth having one entry here, to show that zero entries is not specifically the issue here.
nit: not sure if this function is really that necessary, it feels like createStringError is already concise enough.
- Use errc::invalid_argument instead of inconvertibleErrorCode()
- Remove assertions
- Move test cases to their own test files.
- Modify the Fat MachO test case according to the comment.
Some comment nits, otherwise LGTM. Please wait for @alexshap to confirm too.
generating the -> generating
I think canonically it should be "Mach-O" rather than "MachO" here and elsewhere in comments.
'##' for comments.
"in the MachO object file" -> "in Mach-O object files" I think reads better.