Register error handler before converting.