program extensions and new Exception constructor

added some program extensions and also added a constructor to
UnityCLException for better error handling.