Revert "Do not use exceptions in get_function_value"
Revert "Do not use exceptions in get_function_value"

This reverts commit a03d580e3371472c43ff693839c4a5e640eb7d42.

fhahn/casmi,fhahn/casmi,fhahn/casmi