Can you move all the methods related to errors to one section of this class? It would make it easier to read.