# exception-info-hook.pkg
# (C) 1999 Lucent Technologies, Bell Laboratories
# Compiled by:
# src/lib/core/init/init.cmi
### "Supposing is good, but finding out is better."
###
### -- Mark Twain in Eruption;
stipulate
package bt = base_types; # base_types is from
src/lib/core/init/built-in.pkg package it = inline_t;
package ps = protostring; # protostring is from
src/lib/core/init/protostring.pkgherein
package exception_info_hook {
#
my exception_name
:
bt::Exception -> bt::String
=
it::cast (\\ (bt::REF s, _, _) = s);
stipulate
fun dummy (e: bt::Exception)
=
ps::meld2
(exception_name e,
" (more info unavailable: exception_info_hook not initialized)");
herein
exception_message_hook
=
bt::REF dummy;
fun exception_message e
=
it::deref exception_message_hook e;
end;
};
end;