Replaced ThrowError with BOOST_THROW_EXCEPTION.  Fixed some style errors.