Throw an exception rather than call exit.

release/4.3a0
Simon Julier 2017-01-20 01:58:59 +00:00
parent d1422ac921
commit 6a109aca9b
1 changed files with 1 additions and 2 deletions

View File

@ -79,8 +79,7 @@ void Argument::matlab_unwrap(FileWriter& file, const string& matlabName) const {
// We cannot handle scalar non const references
if (!isNotScalar && is_ref && !is_const) {
cerr << "Cannot wrap a scalar non-const reference" << endl;
exit(-1);
throw std::runtime_error("Cannot unwrap a scalar non-const reference");
}
if (is_ptr && type.category != Qualified::EIGEN)