Handle constant handling for unmarshalling directly

This catches the exception at the place where we raise it. This also
allows for a message similar to MRI, which apparently Rails depends on
in their code.