]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/doc/fastbuf.txt
Daemon: Let daemon actions be numbered from 1
[libucw.git] / ucw / doc / fastbuf.txt
index 86ab55d923dba0b55026c31489b4e050d4e9dfc9..13590a5dd431101a97ae3baec0b3947f6f8915c2 100644 (file)
@@ -18,11 +18,10 @@ inbetween and remember that the file position reported by @btell() points after
 the flushed buffer, which is not necessarily the same as after the data you've
 really read.
 
-Most fastbuf back-ends also participate in the libucw resource management system.
-If you have a resource pool active, newly created fastbufs are automatically tied
-to resources in the pool, so when the pool gets cleaned up, the fastbufs are
-freed, too. The bclose() function is still available and it removes the tie
-as needed.
+Fastbufs can also participate in the libucw resource management system.
+You can tie a fastbuf to a resource in the current resource pool by @fb_tie().
+When the pool gets cleaned up, the fastbuf is automatically closed. If you call
+@bclose() explicitly, the resource is removed, too.
 
 .Back-ends:
 - <<fbparam,Files (parametrized)>>
@@ -41,6 +40,7 @@ as needed.
 .Other reading:
 - <<internal,Internal structure>>
 - <<bconfig,Configuring streams>>
+- <<fbexc,Exceptions>>
 
 ucw/fastbuf.h
 -------------
@@ -67,3 +67,18 @@ ucw/ff-binary.h
 ---------------
 
 !!ucw/ff-binary.h
+
+Exceptions [[fbexc]]
+--------------------
+
+All standard back-ends and front-ends raise exceptions on errors. All such
+exceptions live in the `ucw.fb` subtree. The following exceptions are defined:
+
+`ucw.fb.eof`:: Unexpected end of file (e.g., when the @FB_DIE_ON_EOF flag is set)
+`ucw.fb.mmap`:: Memory mapping failed (e.g., the `mmap` syscall has failed)
+`ucw.fb.open`:: Opening failed (file does not exist and similar problems)
+`ucw.fb.read`:: Read error (e.g., the `read` syscall has failed or the stream is write-only)
+`ucw.fb.seek`:: Seek error (e.g., file not seekable, or a seek behind EOF)
+`ucw.fb.tmp`:: Creation of temporary file failed
+`ucw.fb.toolong`:: Object (typically a line) is too long
+`ucw.fb.write`:: Write error (e.g., the `write` syscall has failed or the stream is read-only)