Warning.st
author Claus Gittinger <cg@exept.de>
Tue, 26 Feb 2002 14:02:26 +0100
changeset 6421 58dca33cf0fc
parent 6206 59d1ec1e1ed5
child 6427 890d7bd17cce
permissions -rw-r--r--
#valueNowOrOnUnwindDo: -> #ensure:

"
 COPYRIGHT (c) 1999 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' }"

Exception subclass:#Warning
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Exceptions'
!

!Warning class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1999 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.
"

!

documentation
"
    Warning is an abstract superclass of all warning exceptions in the system

    [author:]
        Stefan Vogel

    [see also:]
        Signal
"

!

examples
"
                                                            [exBegin]
    Warning raiseRequest
                                                            [exEnd]
"

! !

!Warning class methodsFor:'initialization'!

initialize

    NotifierString := 'Warning'.

    "
     self initialize
    "

    "Created: / 23.7.1999 / 15:34:27 / stefan"
! !

!Warning methodsFor:'default actions'!

defaultAction
    "Default action for warnings: open a warn box with description"

    |text|

    text := self description.

    (Smalltalk isInitialized and:[Dialog notNil]) ifTrue:[
        Dialog warn:text.
    ] ifFalse:[
        "
         on systems without GUI, simply show
         the message on the Transcript.
        "
        Transcript showCR:text.
    ].
    self proceed.

    "
      Warning raiseRequestWith:self errorString:' abc'
    "

    "Modified: / 3.8.1999 / 14:06:41 / stefan"
! !

!Warning class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/Warning.st,v 1.7 2001-11-17 10:01:33 cg Exp $'
! !
Warning initialize!