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
|
// We cannot handle scalar non const references
|
||||||
if (!isNotScalar && is_ref && !is_const) {
|
if (!isNotScalar && is_ref && !is_const) {
|
||||||
cerr << "Cannot wrap a scalar non-const reference" << endl;
|
throw std::runtime_error("Cannot unwrap a scalar non-const reference");
|
||||||
exit(-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_ptr && type.category != Qualified::EIGEN)
|
if (is_ptr && type.category != Qualified::EIGEN)
|
||||||
|
|
Loading…
Reference in New Issue