Next Previous Up Top Contents Index

2.6 The COMMON-EXTENSIONS module

default-handler

G.f. method

Summary

Prints the message of a warning instance to the Functional Developer debugger window's messages pane.

Syntax

default-handler warning => false 

Arguments

warning
An instance of <warning>.

Values

false
#f.

Library

common-extensions

Module

common-extensions

Description

Prints the message of a warning instance to the Functional Developer debugger window's messages pane. It uses debug-message, page 23, to do so.

This method is a required, predefined method in the Dylan language, described on page 361 of the DRM as printing the warning's message in an implementation-defined way. We document this method here because our implementation of it uses the function debug-message, which is defined in the Functional-Extensions library. Thus to use this default-handler method on <warning>, your library needs to use the Functional-Extensions library or a library that uses it (such as Functional-Dylan), rather than simply using the Dylan library.

Example

In the following code, the signalled messages appear in the Functional Developer debugger window.

define class <my-warning> (<warning>) 
end class;
define method say-hello()
  format-out("hello there!\n");
  signal("help!");
  signal(make(<my-warning>));
  format-out("goodbye\n");
end method say-hello;
say-hello();

The following messages appear in the debugger messages pane:

Application Dylan message: Warning: help!
Application Dylan message: Warning: {<my-warning>}

Where {<my-warning>} means an instance of <my-warning>.

See also

debug-message, page 23.

default-handler, page 361 of the DRM.


Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index