indexing
description: "Errors, warnings and other kind of messages"
library: "Gobo Eiffel Utility Library"
author: "Eric Bezault <ericb@gobo.demon.co.uk>"
copyright: "Copyright (c) 1998, Eric Bezault"
deferred class interface
UT_ERROR
feature -- Access
any_array_: KL_ARRAY_ROUTINES [ANY]
-- Routines that ought to be in class ARRAY
-- (from KL_IMPORTED_ARRAY_ROUTINES)
ensure -- from KL_IMPORTED_ARRAY_ROUTINES
any_array_routines_not_void: Result /= void
arguments: KL_ARGUMENTS
-- Command-line arguments
-- (from KL_SHARED_ARGUMENTS)
ensure -- from KL_SHARED_ARGUMENTS
arguments_not_void: Result /= void
code: STRING
-- Error code
-- (Might be useful to identify user-defined templates.)
ensure
code_not_void: Result /= void
default_message: STRING
-- Default error message built using default_template
ensure
default_message_not_void: Result /= void
default_template: STRING
-- Default template used to built the error message
ensure
default_template_not_void: Result /= void
integer_array_: KL_ARRAY_ROUTINES [INTEGER]
-- Routines that ought to be in class ARRAY
-- (from KL_IMPORTED_ARRAY_ROUTINES)
ensure -- from KL_IMPORTED_ARRAY_ROUTINES
integer_array_routines_not_void: Result /= void
message (a_template: STRING): STRING
-- Error message built using a_template;
-- Occurrences of "$N" or "${N}" (where N stands
-- for [0-9]+) in the template are substituted by
-- the entry N in parameters or left as "$N"
-- or "${N}" if N is out of bounds, unless it is
-- equal to 0 in which case it is substituted by
-- the program name. The character '$' is escaped
-- using "$$". Return a new string each time.
require
a_template_not_void: a_template /= void
ensure
message_not_void: Result /= void
parameters: ARRAY [STRING]
-- Parameters used for building the error message
-- (See header comment of message for details.)
string_: KL_STRING_ROUTINES
-- Routines that ought to be in class STRING
-- (from KL_IMPORTED_STRING_ROUTINES)
ensure -- from KL_IMPORTED_STRING_ROUTINES
string_routines_not_void: Result /= void
string_array_: KL_ARRAY_ROUTINES [STRING]
-- Routines that ought to be in class ARRAY
-- (from KL_IMPORTED_ARRAY_ROUTINES)
ensure -- from KL_IMPORTED_ARRAY_ROUTINES
string_array_routines_not_void: Result /= void
invariant
-- from GENERAL
reflexive_equality: standard_is_equal (Current);
reflexive_conformance: conforms_to (Current);
parameters_not_void: parameters /= void;
no_void_parameter: not string_array_.has (parameters, void);
end -- class UT_ERROR