DEV: Replace outputted message by throw std::exception