More information runtime error for missing case

Now gives line number and function, returning an error code,
without the ugly assertion failure.