custom error on access to private methods