raising an error on private method calls