Files
EWF/library/utility/general/error/src/error_custom.e
Jocelyn Fiat 3bb9101b07 Improved error library by refactorying the sync as two way propagation.
Now one can setup error handler propagation in one way, or two way (sync).
The "reset" applies in both way, even if this is a one way propagation to fit current existing usage.
Added optional id for the error handlers.
Feature renaming according to design changes.
Added related autotest cases.
2016-01-12 16:09:29 +01:00

58 lines
1.2 KiB
Plaintext

note
description : "Objects that represent a custom error"
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2015-10-10 00:55:41 +0200 (sam., 10 oct. 2015) $"
revision: "$Revision: 97980 $"
class
ERROR_CUSTOM
inherit
ERROR
create
make
feature {NONE} -- Initialization
make (a_code: INTEGER; a_name: like name; a_message: detachable READABLE_STRING_GENERAL)
-- Initialize `Current'.
do
code := a_code
name := a_name
if a_message /= Void then
message := a_message.as_string_32
else
message := {STRING_32} "Error: " + a_name + " (code=" + a_code.out + ")"
end
end
feature -- Access
code: INTEGER
name: READABLE_STRING_8
message: detachable READABLE_STRING_32
feature -- Visitor
process (a_visitor: ERROR_VISITOR)
-- Process Current using `a_visitor'.
do
a_visitor.process_custom (Current)
end
note
copyright: "2011-2016, Jocelyn Fiat, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end