pycontainers: Properly handle KeyErrors
pycontainers: Properly handle KeyErrors

We raise a C++ exception to abort the rest of the execution of
the function.

At the same time we standardize on using a throw runtime error as the
method to avoid warning when not returning values. (some places
used this throw and some other used std::terminate)

Fixes #403

Signed-off-by: Sylvain Munaut <349f318521b45672c77207abf1a5ed60eb011db1@246tNt.com>

SymbiFlow/nextpnr,YosysHQ/nextpnr,YosysHQ/nextpnr,YosysHQ/nextpnr,YosysHQ/nextpnr,SymbiFlow/nextpnr,SymbiFlow/nextpnr,SymbiFlow/nextpnr