JuliaLang/julia — pull request #5299 by lucasb-eyer (2014-01-04 17:09:20+00:00)
Title: Improved error handling in base

As a follow-up to #5193, I went ahead and checked the error-handling of most `ccall`s in `base/`. This pull-request does the following (I suggest to read the commits one-by-one instead of the full diff):

- a35ee0e replaces calls to `error` by calls to `systemerror` where these match perfectly.
- 4ff219f handles two cases where the `ccall`s might fail in two different ways, one with setting errno and the other without.
- b4e722d adds calls to `systemerror` where there weren't but I think there should be.
- 8af88ab fixes a bunch of minor errors and inconsistencies with error-handling in `fs.jl`.

I've been very cautious and `make testall` passes all tests, but please do review and comment.