[TASK] Changed error to Object Oriented style