move error handling out of eval() through exceptions