ObjFW  Check-in [62e2de30b9]

Overview
Comment:Explicitly pass errno to exceptions

The old behaviour where the exception would access errno directly on
creation of the exception was very fragile. The two main problems with
it were that sometimes it would pick up an errno even though none had
been set and in other cases that when the exception was created errno
had already been overridden.

This also greatly increases errno handling on Win32, especially in
conjunction with sockets. It can still be improved further, though.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 62e2de30b90a84e880b0e0f41c526ae7238bc9ee496e4a511195f559f7d846a9
User & Date: js on 2015-02-16 08:39:17
Other Links: manifest | tags
Context
2015-02-18
22:56
Add of_getsockname() and make use of it check-in: f18615e057 user: js tags: trunk
2015-02-16
08:39
Explicitly pass errno to exceptions check-in: 62e2de30b9 user: js tags: trunk
2015-02-01
14:42
of_resolve_host(): Place inet_addr() inside mutex check-in: 2e176bc500 user: js tags: trunk
Changes

Modified ObjFW.xcodeproj/project.pbxproj from [e18fb0f89b] to [ea821de98c].    [diff]

Modified configure.ac from [073f94a1b8] to [c29aae2dde].    [diff]

Modified src/OFFile.m from [864c3ff8dd] to [43dd30c121].    [diff]

Modified src/OFHTTPClient.m from [777515ef21] to [24ccd00731].    [diff]

Modified src/OFINIFile.m from [423c3c64eb] to [f3f3f87feb].    [diff]

Modified src/OFKernelEventObserver.m from [d24665c090] to [83e01ba01e].    [diff]

Modified src/OFKernelEventObserver_kqueue.m from [254cd34c13] to [d49b28d198].    [diff]

Modified src/OFProcess.m from [957d79c2fa] to [5b951c5966].    [diff]

Modified src/OFStdIOStream.m from [ba7c43016e] to [a3654b4d40].    [diff]

Modified src/OFStream.m from [2daf8ca68b] to [298e596b16].    [diff]

Modified src/OFStreamSocket.m from [70d50e1c9d] to [c547367b26].    [diff]

Modified src/OFString.m from [e0dd905710] to [52d4d85f15].    [diff]

Modified src/OFTCPSocket.m from [a985ec70c8] to [f120fb3aeb].    [diff]

Modified src/OFUDPSocket.m from [386cfc0afe] to [3c38516b1b].    [diff]

Modified src/OFZIPArchive.m from [31589af3b0] to [f5b578d7a5].    [diff]

Modified src/exceptions/OFAcceptFailedException.h from [9c145d6316] to [8ed051874b].    [diff]

Modified src/exceptions/OFAcceptFailedException.m from [6b5a7fb707] to [8e3daf4a3e].    [diff]

Modified src/exceptions/OFAddressTranslationFailedException.h from [d22c46e79d] to [10dbec0388].    [diff]

Modified src/exceptions/OFAddressTranslationFailedException.m from [77d11f6554] to [f2e2a2e8ce].    [diff]

Modified src/exceptions/OFAlreadyConnectedException.m from [066c417ccd] to [bf8b387998].    [diff]

Modified src/exceptions/OFBindFailedException.h from [3618bd7263] to [e8368795dc].    [diff]

Modified src/exceptions/OFBindFailedException.m from [efaadf4326] to [eae71b417b].    [diff]

Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.h from [8e1fb069a3] to [ceef029863].    [diff]

Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.m from [dce8eb235d] to [1fb33d2cc1].    [diff]

Modified src/exceptions/OFChangeOwnerFailedException.h from [9462af8540] to [ccba6648e0].    [diff]

Modified src/exceptions/OFChangeOwnerFailedException.m from [1ddfaee79f] to [5e180f7511].    [diff]

Modified src/exceptions/OFChangePermissionsFailedException.h from [41fb78b8c0] to [822684a5ba].    [diff]

Modified src/exceptions/OFChangePermissionsFailedException.m from [50ffef8dad] to [ee8d14e7c5].    [diff]

Modified src/exceptions/OFConnectionFailedException.h from [e298d451ea] to [61b9685104].    [diff]

Modified src/exceptions/OFConnectionFailedException.m from [03825848e7] to [77019ce3e4].    [diff]

Modified src/exceptions/OFCopyItemFailedException.h from [bce67d81dc] to [a38994cfde].    [diff]

Modified src/exceptions/OFCopyItemFailedException.m from [5c98735b80] to [31714a2509].    [diff]

Modified src/exceptions/OFCreateDirectoryFailedException.h from [03b95f70a4] to [447307d92e].    [diff]

Modified src/exceptions/OFCreateDirectoryFailedException.m from [b368ad7360] to [7442d8e670].    [diff]

Modified src/exceptions/OFCreateSymbolicLinkFailedException.h from [68e5a962d1] to [090e3b7afe].    [diff]

Modified src/exceptions/OFCreateSymbolicLinkFailedException.m from [3a276fc80a] to [e23d5c4909].    [diff]

Modified src/exceptions/OFEnumerationMutationException.m from [35427b9bc0] to [d96cb108f1].    [diff]

Modified src/exceptions/OFException.h from [f58935f385] to [81451deb50].    [diff]

Modified src/exceptions/OFException.m from [f35f997d0d] to [23bfa51fc4].    [diff]

Modified src/exceptions/OFHTTPRequestFailedException.m from [cf0d86a98b] to [df276b3585].    [diff]

Modified src/exceptions/OFHashAlreadyCalculatedException.m from [95cce9d5a5] to [9bf5548117].    [diff]

Modified src/exceptions/OFInitializationFailedException.m from [26c9c44c2d] to [80689772fb].    [diff]

Modified src/exceptions/OFLinkFailedException.h from [869469c410] to [4ee2fb6264].    [diff]

Modified src/exceptions/OFLinkFailedException.m from [9dbf2235b5] to [a0545e5899].    [diff]

Modified src/exceptions/OFListenFailedException.h from [ce3a805b58] to [9409a555ca].    [diff]

Modified src/exceptions/OFListenFailedException.m from [b8a823d6c3] to [88817ed048].    [diff]

Modified src/exceptions/OFLockFailedException.m from [241b90c799] to [f674581484].    [diff]

Modified src/exceptions/OFMalformedXMLException.m from [a8ad14496d] to [a2f194b17a].    [diff]

Modified src/exceptions/OFMoveItemFailedException.h from [935cda0c3e] to [fbb81728bb].    [diff]

Modified src/exceptions/OFMoveItemFailedException.m from [de79d304be] to [9aecf924e2].    [diff]

Modified src/exceptions/OFNotConnectedException.m from [284b7d5620] to [3dd688e897].    [diff]

Modified src/exceptions/OFNotImplementedException.m from [e011dcc801] to [9a89086e6f].    [diff]

Modified src/exceptions/OFOpenFileFailedException.h from [af8167010b] to [ac17edec1a].    [diff]

Modified src/exceptions/OFOpenFileFailedException.m from [d398ad4641] to [195f94c4ef].    [diff]

Modified src/exceptions/OFReadFailedException.m from [6584b3bcc2] to [700fd5671f].    [diff]

Modified src/exceptions/OFReadOrWriteFailedException.h from [f505bf8f83] to [4634f2a2fb].    [diff]

Modified src/exceptions/OFReadOrWriteFailedException.m from [231337000a] to [545888cf6f].    [diff]

Modified src/exceptions/OFRemoveItemFailedException.h from [15c7a3050b] to [73ca224d91].    [diff]

Modified src/exceptions/OFRemoveItemFailedException.m from [981990160b] to [0dda65f54c].    [diff]

Modified src/exceptions/OFSeekFailedException.h from [0316afd3f6] to [fe22120f50].    [diff]

Modified src/exceptions/OFSeekFailedException.m from [ed7c96dc99] to [cf10b6e3aa].    [diff]

Modified src/exceptions/OFSetOptionFailedException.h from [7f61e0c7f4] to [de749ff86f].    [diff]

Modified src/exceptions/OFSetOptionFailedException.m from [760365c630] to [3c40ebe6aa].    [diff]

Modified src/exceptions/OFStillLockedException.m from [34569b0abc] to [a561eaaaf4].    [diff]

Modified src/exceptions/OFUnboundNamespaceException.m from [ef831068b0] to [a09ea2fd0c].    [diff]

Modified src/exceptions/OFUnboundPrefixException.m from [62079e56c9] to [90e777145f].    [diff]

Modified src/exceptions/OFUnknownXMLEntityException.m from [e814d7fe70] to [bc3518da16].    [diff]

Modified src/exceptions/OFUnlockFailedException.m from [d8165065d5] to [12e86a7ae4].    [diff]

Modified src/exceptions/OFUnsupportedProtocolException.m from [5e5a8130a5] to [6fe6409dba].    [diff]

Modified src/exceptions/OFUnsupportedVersionException.m from [29348d88b2] to [11627bba68].    [diff]

Modified src/exceptions/OFWriteFailedException.m from [ee25db4689] to [c62a6dbf27].    [diff]

Deleted src/exceptions/common.h version [83d14795d1].

Modified src/resolver.m from [65cb318889] to [32d271bf6a].    [diff]

Modified src/socket.h from [8dbb1d9128] to [347ab62b21].    [diff]

Modified src/socket.m from [32dd0de4f8] to [f110c9fc59].    [diff]