C++ exceptions added to astro.cpp