catch the error from a parameter optimization loop

catch the error from a parameter optimization loop and replace it with a different result


This is a companion discussion topic for the original entry at https://kni.me/w/FV0svAqpeec9QjAq