Don't panic in proxy builder
Return an error instead. In order to avoid changing the signature of the
function in backwards incompatible ways, I added a few new variants to
the existing Error
type in use. These new variants are likely useful
in a few other places too.
Fixes: #319 (closed)