OpenError.st
author Claus Gittinger <cg@exept.de>
Fri, 20 Jan 2012 16:30:01 +0100
changeset 13966 36da0e47ac1e
parent 11395 4ca8adad4510
child 14515 d67e2c9e2acb
child 17711 39faaaf888b4
permissions -rw-r--r--
automatic checkIn

"
 COPYRIGHT (c) 2004 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libbasic' }"

StreamError subclass:#OpenError
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Exceptions-Errors'
!

!OpenError class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2004 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
! !

!OpenError methodsFor:'accessing'!

pathName
    "the name of the file/device which failed to open"

    (parameter isNil or:[parameter isString]) ifTrue:[
        ^ parameter
    ].

    ^ parameter pathName

    "Modified: / 16-01-2008 / 20:24:24 / cg"
!

stream
    "the stream which failed to open"

    ^ parameter
! !

!OpenError methodsFor:'printing & storing'!

description
    |description p|

    description := super description.

    p := self pathName.
    p notEmptyOrNil ifTrue:[
        description := description, ': ', p
    ].
    ^ description 

    "
        '/tmp/nIcHtExIsTeNt' asFilename readStream
    "
! !

!OpenError class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/OpenError.st,v 1.9 2008-12-08 11:50:45 stefan Exp $'
! !