Throw exception on error (Bug #12275).