Index: libcfa/src/fstream.cfa
===================================================================
--- libcfa/src/fstream.cfa	(revision a5a6a1a867bb69e98b075b209f4ed8246df23c94)
+++ libcfa/src/fstream.cfa	(revision ba0d2ea29dd3a7cf3a956fdb95858e26844b2466)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 22 11:34:41 2021
-// Update Count     : 448
+// Last Modified On : Thu Jul 29 22:34:10 2021
+// Update Count     : 454
 //
 
@@ -142,5 +142,6 @@
 
 	if ( fclose( (FILE *)(os.file$) ) == EOF ) {
-		abort | IO_MSG "close output" | nl | strerror( errno );
+		throw (Close_Failure){ os };
+		// abort | IO_MSG "close output" | nl | strerror( errno );
 	} // if
 	os.file$ = 0p;
@@ -149,9 +150,11 @@
 ofstream & write( ofstream & os, const char data[], size_t size ) {
 	if ( fail( os ) ) {
-		abort | IO_MSG "attempt write I/O on failed stream";
+		throw (Write_Failure){ os };
+		// abort | IO_MSG "attempt write I/O on failed stream";
 	} // if
 
 	if ( fwrite( data, 1, size, (FILE *)(os.file$) ) != size ) {
-		abort | IO_MSG "write" | nl | strerror( errno );
+		throw (Write_Failure){ os };
+		// abort | IO_MSG "write" | nl | strerror( errno );
 	} // if
 	return os;
@@ -277,5 +280,6 @@
 
 	if ( fclose( (FILE *)(is.file$) ) == EOF ) {
-		abort | IO_MSG "close input" | nl | strerror( errno );
+		throw (Close_Failure){ is };
+		// abort | IO_MSG "close input" | nl | strerror( errno );
 	} // if
 	is.file$ = 0p;
@@ -284,9 +288,11 @@
 ifstream & read( ifstream & is, char data[], size_t size ) {
 	if ( fail( is ) ) {
-		abort | IO_MSG "attempt read I/O on failed stream";
+		throw (Read_Failure){ is };
+		// abort | IO_MSG "attempt read I/O on failed stream";
 	} // if
 
 	if ( fread( data, size, 1, (FILE *)(is.file$) ) == 0 ) {
-		abort | IO_MSG "read" | nl | strerror( errno );
+		throw (Read_Failure){ is };
+		// abort | IO_MSG "read" | nl | strerror( errno );
 	} // if
 	return is;
@@ -338,10 +344,9 @@
 
 
-//EHM_VIRTUAL_TABLE(Open_Failure, Open_Failure_main_table);
-static vtable(Open_Failure) Open_Failure_main_table;
+static vtable(Open_Failure) Open_Failure_vt;
 
 // exception I/O constructors
 void ?{}( Open_Failure & this, ofstream & ostream ) {
-	this.virtual_table = &Open_Failure_main_table;
+	this.virtual_table = &Open_Failure_vt;
 	this.ostream = &ostream;
 	this.tag = 1;
@@ -349,16 +354,64 @@
 
 void ?{}( Open_Failure & this, ifstream & istream ) {
-	this.virtual_table = &Open_Failure_main_table;
+	this.virtual_table = &Open_Failure_vt;
 	this.istream = &istream;
 	this.tag = 0;
 } // ?{}
 
-void throwOpen_Failure( ofstream & ostream ) {
-	Open_Failure exc = { ostream };
-}
-
-void throwOpen_Failure( ifstream & istream ) {
-	Open_Failure exc = { istream };
-}
+
+static vtable(Close_Failure) Close_Failure_vt;
+
+// exception I/O constructors
+void ?{}( Close_Failure & this, ofstream & ostream ) {
+	this.virtual_table = &Close_Failure_vt;
+	this.ostream = &ostream;
+	this.tag = 1;
+} // ?{}
+
+void ?{}( Close_Failure & this, ifstream & istream ) {
+	this.virtual_table = &Close_Failure_vt;
+	this.istream = &istream;
+	this.tag = 0;
+} // ?{}
+
+
+static vtable(Write_Failure) Write_Failure_vt;
+
+// exception I/O constructors
+void ?{}( Write_Failure & this, ofstream & ostream ) {
+	this.virtual_table = &Write_Failure_vt;
+	this.ostream = &ostream;
+	this.tag = 1;
+} // ?{}
+
+void ?{}( Write_Failure & this, ifstream & istream ) {
+	this.virtual_table = &Write_Failure_vt;
+	this.istream = &istream;
+	this.tag = 0;
+} // ?{}
+
+
+static vtable(Read_Failure) Read_Failure_vt;
+
+// exception I/O constructors
+void ?{}( Read_Failure & this, ofstream & ostream ) {
+	this.virtual_table = &Read_Failure_vt;
+	this.ostream = &ostream;
+	this.tag = 1;
+} // ?{}
+
+void ?{}( Read_Failure & this, ifstream & istream ) {
+	this.virtual_table = &Read_Failure_vt;
+	this.istream = &istream;
+	this.tag = 0;
+} // ?{}
+
+// void throwOpen_Failure( ofstream & ostream ) {
+// 	Open_Failure exc = { ostream };
+// }
+
+// void throwOpen_Failure( ifstream & istream ) {
+// 	Open_Failure exc = { istream };
+// }
 
 // Local Variables: //
Index: libcfa/src/fstream.hfa
===================================================================
--- libcfa/src/fstream.hfa	(revision a5a6a1a867bb69e98b075b209f4ed8246df23c94)
+++ libcfa/src/fstream.hfa	(revision ba0d2ea29dd3a7cf3a956fdb95858e26844b2466)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jul 20 21:18:03 2021
-// Update Count     : 232
+// Last Modified On : Wed Jul 28 07:35:50 2021
+// Update Count     : 234
 //
 
@@ -160,4 +160,40 @@
 void ?{}( Open_Failure & this, ifstream & );
 
+exception Close_Failure {
+	union {
+		ofstream * ostream;
+		ifstream * istream;
+	};
+	// TEMPORARY: need polymorphic exceptions
+	int tag;											// 1 => ostream; 0 => istream
+};
+
+void ?{}( Close_Failure & this, ofstream & );
+void ?{}( Close_Failure & this, ifstream & );
+
+exception Write_Failure {
+	union {
+		ofstream * ostream;
+		ifstream * istream;
+	};
+	// TEMPORARY: need polymorphic exceptions
+	int tag;											// 1 => ostream; 0 => istream
+};
+
+void ?{}( Write_Failure & this, ofstream & );
+void ?{}( Write_Failure & this, ifstream & );
+
+exception Read_Failure {
+	union {
+		ofstream * ostream;
+		ifstream * istream;
+	};
+	// TEMPORARY: need polymorphic exceptions
+	int tag;											// 1 => ostream; 0 => istream
+};
+
+void ?{}( Read_Failure & this, ofstream & );
+void ?{}( Read_Failure & this, ifstream & );
+
 // Local Variables: //
 // mode: c //
