Merge "Throw proper exception in ResourcesManager" into nyc-dev