]> git.mxchange.org Git - simgear.git/blobdiff - simgear/timing/lowleveltime.cxx
Manage OSG object cache explicitly
[simgear.git] / simgear / timing / lowleveltime.cxx
index 84e72c834c10ece73696bfbfea07d7987fbde322..a550526924f798768125abeed3043cf1cff88d43 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Library General Public License for more details.
  *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA  02111-1307, USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  **************************************************************************/
 
@@ -41,6 +40,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <limits.h>
+
+#include <simgear/structure/exception.hxx>
+
 #include "lowleveltime.h"
 
 
@@ -332,19 +334,18 @@ static void fgtzset_internal (int always, const char *tz)
   fgtzfile_read (tz);
   if (use_fgtzfile)
     return;
-  // The default behaviour of the originale tzset_internal (int always, char* tz) 
-  // function is to set up a default timezone, in any casetz file_read() fails
-  // Currently this leads to problems, because it modidifies the system timezone
+  // The default behaviour of the original tzset_internal (int always, char* tz) 
+  // function is to set up a default timezone, in any case file_read() fails
+  // Currently this leads to problems, because it modifies the system timezone
   // and not the local aircraft timezone, contained in FlightGear. I could adapt 
   // this in future versions of this code, but doubt whether this is what we really
-  // want. So right now, exit when timezone information reading failed. 
+  // want. So right now, throw an exception when timezone information reading failed. 
   // Guess I'll change that to something like 12 * (FG_LON / 180.0)
   // 
   // For now, I'll leave it like this.
   else
   {
-    printf ("Timezone reading failed\n");
-    exit(1);
+    throw sg_exception("Timezone reading failed");
   }
   // this emacs "comment out" function is cool!