Throw an exception rather than call exit.
parent
d1422ac921
commit
6a109aca9b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue