included #include <stdexcept> instead of <exception> to try to define std::domain_error reported missing by Darwin 4.2.1 and others.