EDoc API
Overview Cluster Class Classes Index          Top Features

edoc.utility

Class EDOC_ERROR_HANDLER


Direct ancestors

EDOC_ERROR_CODES, EDOC_ERROR_MESSAGES, KL_SHARED_STANDARD_FILES, KL_IMPORTED_STRING_ROUTINES, EXCEPTIONS

Creation

Features

Invariants

indexing

description

Error handler

copyright

Copyright (c) 2005, Julian Tschannen

license

Eiffel Forum License v2 (see forum.txt)

class EDOC_ERROR_HANDLER

inherit

EDOC_ERROR_CODES

create

make

-- Create an error handler instance

feature -- Access

last_error_code: INTEGER

-- Code of last error

last_error_message: STRING

-- Message of last error

Error_ace_file_not_found: INTEGER

-- Ace file not found
-- (From EDOC_ERROR_CODES)

Error_ace_file_not_readable: INTEGER

-- Ace file not readable
-- (From EDOC_ERROR_CODES)

Error_create_directory: INTEGER

-- Failed to create directory
-- (From EDOC_ERROR_CODES)

Error_create_output_directory: INTEGER

-- Failed to create output directory
-- (From EDOC_ERROR_CODES)

Error_css_file_not_found: INTEGER

-- CSS file not found
-- (From EDOC_ERROR_CODES)

Error_feature_order_file_not_found: INTEGER

-- Feature order file not found
-- (From EDOC_ERROR_CODES)

Error_file_not_found: INTEGER

-- File not found
-- (From EDOC_ERROR_CODES)

Error_file_not_readable: INTEGER

-- File not readable
-- (From EDOC_ERROR_CODES)

Error_file_not_writeable: INTEGER

-- File not writable
-- (From EDOC_ERROR_CODES)

Error_invalid_boolean_option: INTEGER

-- Invalid boolean option
-- (From EDOC_ERROR_CODES)

Error_invalid_option_line: INTEGER

-- Invalid line in option file
-- (From EDOC_ERROR_CODES)

Error_mounted_xace_not_found: INTEGER

-- Mounted xace file not found
-- (From EDOC_ERROR_CODES)

Error_no_input_file: INTEGER

-- No input file specified
-- (From EDOC_ERROR_CODES)

Error_no_options_directory_found: INTEGER

-- No options directory found
-- (From EDOC_ERROR_CODES)

Error_options_file_doesnt_exist: INTEGER

-- Options file doesn't exist
-- (From EDOC_ERROR_CODES)

Error_options_file_open_read_failed: INTEGER

-- Failed to open options file
-- (From EDOC_ERROR_CODES)

Error_parsing_ace: INTEGER

-- Failed to parse ace file
-- (From EDOC_ERROR_CODES)

Error_parsing_xace: INTEGER

-- Failed to parse xace file
-- (From EDOC_ERROR_CODES)

Error_unknown_option: INTEGER

-- Unkown option in option file
-- (From EDOC_ERROR_CODES)

Error_xace_file_not_found: INTEGER

-- Xace file not found
-- (From EDOC_ERROR_CODES)

Error_xace_file_not_readable: INTEGER

-- Xace file not found
-- (From EDOC_ERROR_CODES)

feature -- Status report

is_file_output_enabled: BOOLEAN

-- Is output of errors in a file enabled?

is_verbose: BOOLEAN

-- Is error handler printing error messages?

feature -- Status setting

die (code: INTEGER)

-- Terminate execution with exit status code,
-- without triggering an exception.
-- (From EXCEPTIONS)

set_file_output_enabled (a_value: like is_file_output_enabled)

-- Set is_file_output_enabled to a_value.

ensure

is_file_output_enabled_set: is_file_output_enabled = a_value

set_verbose (a_value: like is_verbose)

-- Set is_verbose to a_value.

ensure

is_verbose_set: is_verbose = a_value

feature -- Basic operations

print_to_error_log_file (a_message: STRING; prepend_date: BOOLEAN)

-- Print a_message to error log file.

raise_error (an_error_code: INTEGER; error_data: ARRAY[ANY])

-- Set last_error to error_code, display an error message and raise developer exception.

ensure

error_set: last_error_code = an_error_code
error_message_set: not last_error_message.is_empty

raise_warning (an_error_code: INTEGER; error_data: ARRAY[ANY])

-- Set last_error to error_code and display an error message.

ensure

error_set: last_error_code = an_error_code
error_message_set: not last_error_message.is_empty

report_message (a_message: STRING)

-- Print a_message in verbose mode.

require

a_message_not_void: a_message /= Void

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)