2454 openError:errorNumber |
2454 openError:errorNumber |
2455 "report an error, that the open failed" |
2455 "report an error, that the open failed" |
2456 |
2456 |
2457 "{ Pragma: +optSpace }" |
2457 "{ Pragma: +optSpace }" |
2458 |
2458 |
2459 |exClass errorSymbol| |
2459 |exClass errorHolder| |
2460 |
2460 |
2461 errorSymbol := OperatingSystem errorSymbolForNumber:errorNumber. |
2461 errorHolder := OperatingSystem errorHolderForNumber:errorNumber. |
2462 exClass := (errorSymbol == #ERROR_FILE_NOT_FOUND or:[errorSymbol == #ENOENT]) |
2462 |
|
2463 exClass := (errorHolder errorCategory == #nonexistentSignal) |
2463 ifTrue:[ FileDoesNotExistException ] |
2464 ifTrue:[ FileDoesNotExistException ] |
2464 ifFalse:[ OpenError ]. |
2465 ifFalse:[ OpenError ]. |
2465 |
2466 |
2466 ^ exClass newException |
2467 ^ exClass newException |
2467 errorCode:errorNumber; |
2468 errorCode:errorNumber; |
2468 "/ cg: initialized lazyly - see #description in OpenError |
2469 osErrorHolder:errorHolder; |
2469 "/ errorString:(' : ' , (OperatingSystem errorTextForNumber:errorNumber)); |
2470 "/ cg: initialized lazyly - see OpenError>>#description |
|
2471 "/ errorString:(' : ' , errorHolder errorString); |
2470 parameter:self; |
2472 parameter:self; |
2471 raiseRequest |
2473 raiseRequest |
2472 "/ in:thisContext sender |
2474 "/ in:thisContext sender |
2473 |
2475 |
2474 "Modified: / 09-09-2011 / 07:22:49 / cg" |
2476 "Modified: / 09-09-2011 / 07:22:49 / cg" |
5760 ! ! |
5762 ! ! |
5761 |
5763 |
5762 !ExternalStream class methodsFor:'documentation'! |
5764 !ExternalStream class methodsFor:'documentation'! |
5763 |
5765 |
5764 version |
5766 version |
5765 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.370 2013-07-08 22:33:56 stefan Exp $' |
5767 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.371 2013-07-09 11:56:22 stefan Exp $' |
5766 ! |
5768 ! |
5767 |
5769 |
5768 version_CVS |
5770 version_CVS |
5769 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.370 2013-07-08 22:33:56 stefan Exp $' |
5771 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.371 2013-07-09 11:56:22 stefan Exp $' |
5770 ! ! |
5772 ! ! |
5771 |
5773 |
5772 |
5774 |
5773 ExternalStream initialize! |
5775 ExternalStream initialize! |