Move error classes to a dedicated file.