Many functions of the Stringbuffer system may return common error codes in certain situations. The following error codes are defined as CONSTs in the stringbuffer.bi file.
WARNINGS & ERRORS:
SBE_UnknownMode
- Is returned by function SeekBuf() only, it means the given mode argument was not recognized by the function. This may be because of an typo in the mode name, look up the correct spelling in file stringbuffer.bi, if in doubt.
SBE_OutOfBounds
- This error may be returned by several functions, it means a given or by a displacement calculated position is out of the valid buffer data range, which is usually 1 to GetBufLen() + 1.
SBE_BadIDNumber
- Is mainly returned by the various marker and find functions, but also by SeekBuf(), if you make a marker seek. It means, that the given marker or find ID was out of the valid range 1 to 100.
- If returned by FreeBufMarkID() or FreeBufFindID(), then there are no more unused IDs available. You should always remove no longer needed markers and find data to make its IDs available for reuse (see RemoveBufMark() and RemoveBufFind()).
SBE_UnusedID
- Also returned by the various marker and find functions, it means you tried to get, goto, seek or remove an unused marker, find or remove unused find data. However, this can be seen as warning for you only, as the respective functions will simply ignore those calls.
SBE_ClearedID
- Similar to the above, but only returned by the marker related functions and SeekBuf(). It means the accessed marker is invalid, because the data at the marked position were deleted. It's also more or less just a warning. You may reassign the respective marker ID to a new position directly or remove the marker to make its ID available for later reuse.