OpenError.st
author convert-repo
Mon, 01 Jul 2013 11:23:23 +0000
changeset 15450 2d6de3f90129
parent 14602 b99d699beb17
child 15499 8793d02e2da4
child 18011 deb0c3355881
permissions -rw-r--r--
update tags

"
 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 respondsTo:#pathName) ifTrue:[
        ^ parameter pathName.
    ].
    ^ parameter

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

stream
    "the stream which failed to open"

    ^ parameter
! !

!OpenError methodsFor:'printing & storing'!

description
    "lazy initialization - the text is not needed for cought exceptions"

    messageText isNil ifTrue:[
        self initializeMessageText
    ].
    ^ super description
!

initializeMessageText
    "for lazy initialization - the text is not needed for cought exceptions"

    messageText := (' : ' , (OperatingSystem errorTextForNumber:errorCode))
!

messageText
    "lazy initialization - the text is not needed for cought exceptions"

    messageText isNil ifTrue:[
        self initializeMessageText
    ].
    ^ messageText
! !

!OpenError class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/OpenError.st,v 1.11 2012-12-17 19:37:12 cg Exp $'
! !