ObjFW  Diff

Differences From Artifact [8fab00e250]:

To Artifact [896f779d12]:

  • File src/exceptions/OFSeekFailedException.h — part of check-in [e1e7ffa903] at 2011-09-22 23:25:42 on branch trunk — Exceptions are now autoreleased.

    This is safe as an "exception loop" can't happen, since if allocating
    an exception fails, it throws an OFAllocFailedException which is
    preallocated and can always be thrown.

    So, the worst case would be that an autorelease of an exception fails,
    triggering an OFOutOfMemoryException for which there is no memory,
    resulting in an OFAllocFailedException to be thrown. (user: js, size: 2064) [annotate] [blame] [check-ins using]


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

/**
 * \param stream The stream for which seeking failed
 * \param offset The offset to which seeking failed
 * \param whence To what the offset is relative
 * \return A new seek failed exception
 */
+ newWithClass: (Class)class_
	stream: (OFSeekableStream*)stream
	offset: (off_t)offset
	whence: (int)whence;

/**
 * Initializes an already allocated seek failed exception.
 *
 * \param stream The stream for which seeking failed
 * \param offset The offset to which seeking failed
 * \param whence To what the offset is relative







|
|
|
|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

/**
 * \param stream The stream for which seeking failed
 * \param offset The offset to which seeking failed
 * \param whence To what the offset is relative
 * \return A new seek failed exception
 */
+ exceptionWithClass: (Class)class_
	      stream: (OFSeekableStream*)stream
	      offset: (off_t)offset
	      whence: (int)whence;

/**
 * Initializes an already allocated seek failed exception.
 *
 * \param stream The stream for which seeking failed
 * \param offset The offset to which seeking failed
 * \param whence To what the offset is relative