eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Warning':

Home

everywhere
www.exept.de
for:
[back]

Class: Warning


Inheritance:

   Object
   |
   +--GenericException
      |
      +--Notification
         |
         +--UserNotification
            |
            +--Warning
               |
               +--ProceedError

Package:
stx:libbasic
Category:
Kernel-Exceptions
Version:
rev: 1.14 date: 2009/10/14 17:34:52
user: cg
file: Warning.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Stefan Vogel

Description:


Warning is the superclass of all warning signals in the system.
The default beavior for an unhandled Warning is to display a warn
box with the error decription. If no display is available, the error 
description is written to the Transcript.


Related information:

    Signal

Class protocol:

initialization
o  initialize

misc ui support
o  iconInBrowserSymbol


Instance protocol:

default actions
o  defaultAction
Default action for warnings: open a warn box with description


Examples:


show a warning:


  Transcript showCR:'1 - now raising'.
  Warning raiseRequest.
  Transcript showCR:'2 - after the raise'.
passing an errorString:


  Warning raiseRequestErrorString:'hello world'
provide a handler for warnings:


  Warning handle:[:ex |
      Transcript showCR:'WARNING: ' , ex description
  ] do:[
      '...'.
      Warning raiseRequest.
      '...'.
  ].

  Warning handle:[:ex |
      Transcript showCR:'WARNING: ' , ex description
  ] do:[
      '...'.
      Warning raiseRequestErrorString:'hello world'.
      '...'.
  ]
ignore warnings during some evaluation:


  Warning ignoreIn:[
      '...'.
      Warning raiseRequest.
      '...'.
  ]
defer a warning to some later time:


  Warning deferAfter:[
      Transcript showCR:'1 - no warning here ...'.
      Warning raiseRequestErrorString:'this warning is deferred'.
      Transcript showCR:'2 - but in a second...'.
  ].
  Transcript showCR:'3 - after warning-protected block'.


ST/X 6.1.1; WebServer 1.620 at exept:8081; Thu, 24 May 2012 04:57:32 GMT