[ Home Page ]
[ Eiffel Archive ]
[ Eiffel Classes and Clusters]
 |
The Eiffel Error Library (eEL)
|
Written by Andreas Leitner.
-
ISE Eiffel,SmallEiffel
using GOBO
on Linux
- Version 0.1.3 - 10/24/1999.
- Eiffel Forum Freeware License.
eel-0_1_3.tgz
(27 357 bytes) - source code
http://leitner.dhs.org/eel/
(eEL home page)
http://leitner.dhs.org/
(Andreas Leitner home page)
What's new
10/24/1999 - released version 0.1.3
Prefixed all library classnames with "EEL_" to avoid name clashes. (The class diagram still needs to be updated)
The benefits
Using eEL will allow the user to decouple error detection and reporting from error handling.
This is especially important for applications that may run with different front ends.
For example a console application will likely have a different way to tell the user
about a missing file, that a GUI application. 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. All in all eEL is
not the biggest best library on earth, it is rather small and fits it's needs. And
most important it provides you with a standard way to handle errors. This means that
even if you use different libraries (given they all use eEL for error handling)
you still have a uniform error handling mechanism.
Class diagram

How to use eEL
The Eiffel Error Library consist of several classes that should make error handling
for applications written in Eiffel easy to implement. To get a grasp on how to use
eEL please have a look at the examples delivered with eEL.
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 a 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.
Requirements
eEL has been developed using ISE Eiffel and SmallEiffel, using GOBO to achieve maximum
compatiblilty. Although it has not been tested extensively I think it should work using
any platform/compiler available. Please report me any successfull use other than ISE
Eiffel / SmallEiffel / Linux.
The License
eEL is distributed under the Eiffel Forum Freeware License. You should have received a
copy of it together with this package. Basically the license says that you can freely
distribute and modify eEL (:
Where to get eEL
The official homepage of eEL is http://leitner.dhs.org/eEL.
You can contact the maintainer via email using
andreas.leitner@teleweb.at.
Download version 0.1.3 of eEL from http://leitner.dhs.org/eel/.
(When using Netscape hold the SHIFT-key pressed while clicking on the link to get
the "Save as" dialog box, otherwise you will see the beauty of a zipped
tar-archive represented as a sequence of characters)
Andreas Leitner andreas.leitner@teleweb.at
[ Home Page ]
[ Eiffel Archive ]
[ Eiffel Classes and Clusters ]