Commit 82e3c016 authored by Niels Möller's avatar Niels Möller
Browse files

(make_exception_handler)

(make_report_exception_info): Deleted.
(class report_exception_handler): Deleted.
(do_report_exception_handler, make_report_exception_handler):
Deleted.

Rev: src/exception.c:1.18.2.5
parent 451597f7
......@@ -46,71 +46,6 @@ DEFINE_EXCEPTION_HANDLER(ignore_exception_handler)
e->msg, e->type, e->subtype);
}
#if 0
struct exception_handler *
make_exception_handler(void (*raise)(struct exception_handler *s,
const struct exception *x),
struct exception_handler *parent,
const char *context)
{
NEW(exception_handler, self);
self->raise = raise;
self->parent = parent;
self->context = context;
return self;
}
struct report_exception_info *
make_report_exception_info(uint32_t mask, uint32_t value,
const char *prefix)
{
NEW(report_exception_info, self);
self->mask = mask;
self->value = value;
self->prefix = prefix;
return self;
}
/* ;;GABA:
(class
(name report_exception_handler)
(super exception_handler)
(vars
(info const object report_exception_info)))
*/
static void
do_report_exception_handler(struct exception_handler *s,
const struct exception *x)
{
CAST(report_exception_handler, self, s);
const struct report_exception_info *info = self->info;
if ( (x->type & info->mask) == info->value)
werror("%z exception: %z\n", info->prefix, x->msg);
else
EXCEPTION_RAISE(self->super.parent, x);
}
struct exception_handler *
make_report_exception_handler(const struct report_exception_info *info,
struct exception_handler *parent,
const char *context)
{
NEW(report_exception_handler, self);
self->super.raise = do_report_exception_handler;
self->super.parent = parent;
self->super.context = context;
self->info = info;
return &self->super;
}
#endif
struct exception *
make_exception(int type, int subtype, const char *msg)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment