If this were Java, we'd be writing: class ErrorException extends Exception ...; class NoSourceFileErrorException extends ErrorException ...; ...; and then try { ... } catch (ErrorException e) { System.out.println (e.toString ()); } but it isn't so we can't. The attached patch establishes a framework that makes it possible to work around this limitation of C. It adds: struct exception; struct exception catch_exception(...) throw_exception(struct exception) (The existing throw_exception is renamed to throw_reason to avoid a name clash, callers updated). This lets users write a rough equivalent: struct exception e = catch_exceptions (....) switch (exception.reason) ... case ERROR_RETURN: print (exception.message); and even opens the possibility of: TRY_CATCH (e) { ... } switch (e.reason) ... The hacks error_silent and error_last_message can now be eliminated. exceptions.[hc]'s has been rewritten to use it; tested on ppc gnu/linux. committed, Andrew