Update Resource.php

Make the thrown message customizable