Update exception.hpp

Change 'ifdef' to 'if defined()'