Changeset 8d321f9 for libcfa/src/fstream.cfa
- Timestamp:
- Jun 19, 2020, 5:46:38 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 6c4bd02
- Parents:
- 1d2314f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r1d2314f r8d321f9 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 18 15:37:21202013 // Update Count : 38 012 // Last Modified On : Fri Jun 19 16:24:54 2020 13 // Update Count : 384 14 14 // 15 15 … … 26 26 27 27 28 // *********************************** ofstream ***********************************28 // *********************************** ofstream *********************************** 29 29 30 30 … … 123 123 #ifdef __CFA_DEBUG__ 124 124 if ( file == 0p ) { 125 throw ( IO_OPEN_FAILURE){ os };126 abort | IO_MSG "open output file \"" | name | "\"" | nl | strerror( errno );125 throw (Open_Failure){ os }; 126 // abort | IO_MSG "open output file \"" | name | "\"" | nl | strerror( errno ); 127 127 } // if 128 128 #endif // __CFA_DEBUG__ … … 182 182 183 183 184 // *********************************** ifstream ***********************************184 // *********************************** ifstream *********************************** 185 185 186 186 … … 222 222 #ifdef __CFA_DEBUG__ 223 223 if ( file == 0p ) { 224 throw ( IO_OPEN_FAILURE){ is };225 abort | IO_MSG "open input file \"" | name | "\"" | nl | strerror( errno );224 throw (Open_Failure){ is }; 225 // abort | IO_MSG "open input file \"" | name | "\"" | nl | strerror( errno ); 226 226 } // if 227 227 #endif // __CFA_DEBUG__ … … 283 283 284 284 285 // *********************************** exceptions ***********************************286 287 288 void ?{}( IO_OPEN_FAILURE& this, ofstream & ostream ) {289 VTABLE_INIT(this, IO_OPEN_FAILURE);285 // *********************************** exceptions *********************************** 286 287 288 void ?{}( Open_Failure & this, ofstream & ostream ) { 289 VTABLE_INIT(this, Open_Failure); 290 290 this.ostream = &ostream; 291 } 292 void ?{}( IO_OPEN_FAILURE & this, ifstream & istream ) { 293 VTABLE_INIT(this, IO_OPEN_FAILURE); 291 this.tag = 1; 292 } 293 void ?{}( Open_Failure & this, ifstream & istream ) { 294 VTABLE_INIT(this, Open_Failure); 294 295 this.istream = &istream; 295 } 296 const char * IO_OPEN_FAILURE_msg(IO_OPEN_FAILURE * this) { 297 return "IO_OPEN_FAILURE"; 298 } 299 VTABLE_INSTANCE(IO_OPEN_FAILURE)(IO_OPEN_FAILURE_msg); 300 void throwIO_OPEN_FAILURE( ofstream & ostream ) { 301 IO_OPEN_FAILURE exc = { ostream }; 302 } 303 void throwIO_OPEN_FAILURE( ifstream & istream ) { 304 IO_OPEN_FAILURE exc = { istream }; 296 this.tag = 0; 297 } 298 const char * Open_Failure_msg(Open_Failure * this) { 299 return "Open_Failure"; 300 } 301 VTABLE_INSTANCE(Open_Failure)(Open_Failure_msg); 302 void throwOpen_Failure( ofstream & ostream ) { 303 Open_Failure exc = { ostream }; 304 } 305 void throwOpen_Failure( ifstream & istream ) { 306 Open_Failure exc = { istream }; 305 307 } 306 308
Note: See TracChangeset
for help on using the changeset viewer.