Reworked BeetleError to have less hackery.