Commit 7a586379 authored by Ferhat Mihoubi's avatar Ferhat Mihoubi

- Displays an error message and interrupts the execution of bytecode in case of unknown function

parent 129d404e
...@@ -916,9 +916,15 @@ Interpreter::compute_block_time(int Per_u_, bool evaluate, int block_num, int si ...@@ -916,9 +916,15 @@ Interpreter::compute_block_time(int Per_u_, bool evaluate, int block_num, int si
#endif #endif
break; break;
case oEqual: case oEqual:
// Nothing to do
break;
default: default:
/*throw EvalException();*/ {
; mexPrintf("Error\n");
ostringstream tmp;
tmp << " in compute_block_time, unknown binary operator " << op << "\n";
throw FatalExceptionHandling(tmp.str());
}
} }
break; break;
case FUNARY: case FUNARY:
...@@ -1062,7 +1068,12 @@ Interpreter::compute_block_time(int Per_u_, bool evaluate, int block_num, int si ...@@ -1062,7 +1068,12 @@ Interpreter::compute_block_time(int Per_u_, bool evaluate, int block_num, int si
# endif # endif
break; break;
default: default:
; {
mexPrintf("Error\n");
ostringstream tmp;
tmp << " in compute_block_time, unknown unary operator " << op << "\n";
throw FatalExceptionHandling(tmp.str());
}
} }
break; break;
case FTRINARY: case FTRINARY:
...@@ -1087,6 +1098,13 @@ Interpreter::compute_block_time(int Per_u_, bool evaluate, int block_num, int si ...@@ -1087,6 +1098,13 @@ Interpreter::compute_block_time(int Per_u_, bool evaluate, int block_num, int si
tmp_out << " |normpdf(" << v1 << ", " << v2 << ", " << v3 << ")|"; tmp_out << " |normpdf(" << v1 << ", " << v2 << ", " << v3 << ")|";
#endif #endif
break; break;
default:
{
mexPrintf("Error\n");
ostringstream tmp;
tmp << " in compute_block_time, unknown trinary operator " << op << "\n";
throw FatalExceptionHandling(tmp.str());
}
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment