This site's content was compiled from 1993 to 2006. Beyond that, Google is your friend.

Eiffel Error Library

Maintainer

Andreas Leitner

Description

The eEL library decouples error detetction and reporting from error handling.

This is especially important for applications that may run with different front ends. For example, a console application and a GUI application will likely have different ways to tell the user about a missing file. With eEL, you only need to provide different error handlers for each front end.

Using developer exceptions to raise errors, it is also possible to launch errors from within creation procedures.

The eEL library is rather small, but it provides you with a standard way to handle errors. This means that even if you use different libraries within a project (provided they all use eEL for error handling) you will still have a uniform error handling mechanism.

Categories

Versions

Links

Features

Although it is not strictly neccessary it is recommend that for your project you create classes for each kind of error you have. Those classes need to inherit from ERROR and store information about why/where the error occured.

Additionally you should derive a class from ERROR_HANDLER. At application startup create an object of that type and set it via SHARED_ERROR_HANDLER.set_error_handler (simply inherit from SHARED_ERROR_HANDLER wherever you want to call this feature). When your application detects an error such as that a file has not been found, it will use ERROR_REPORTER.raise_error (my_error) (Again inherit from SHARED_ERROR_REPORTER). That will raise a developer exception that should be caught at a reasonable place where a call to error_reporter.report_error(error_handler.error) will notify the user about the error.

» image: eEL documentation

Supported compilers

Platforms

Licensing

Dependencies

Google
 
Web eiffelzone.com