Moved throw errors to ErrorManager

Function needs to specify a return value.