annotate gen/configfile.cpp @ 1475:1f29cbc36bf5

Fix memory leak in configfile.cpp...probably the only one in ldc!
author Kelly Wilson <wilsonk cpsc.ucalgary.ca>
date Thu, 04 Jun 2009 16:46:05 -0600
parents 8309ebaa23d5
children df0ffca8a636
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
1 #include <iostream>
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
2 #include <string>
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
3 #include <cassert>
1340
206329112670 Fix the ldcbinarypath config file rewriting.
Christian Kamm <kamm incasoftware de>
parents: 1339
diff changeset
4 #include <cstring>
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
5
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
6 #include "llvm/System/Path.h"
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
7
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
8 #include "libconfig.h++"
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
9
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
10 #include "gen/configfile.h"
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
11
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
12 #include "mars.h"
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
13
1473
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
14 #if _WIN32
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
15 #include <windows.h>
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
16 #undef GetCurrentDirectory
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
17 #endif
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
18
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
19 namespace sys = llvm::sys;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
20
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
21 ConfigFile::ConfigFile()
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
22 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
23 cfg = new libconfig::Config;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
24 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
25
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
26 ConfigFile::~ConfigFile()
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
27 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
28 delete cfg;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
29 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
30
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
31 bool ConfigFile::read(const char* argv0, void* mainAddr, const char* filename)
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
32 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
33
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
34 // try to find the config file
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
35
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
36 // 1) try the current working dir
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
37 sys::Path p = sys::Path::GetCurrentDirectory();
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
38 p.appendComponent(filename);
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
39
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
40 if (!p.exists())
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
41 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
42 // 2) try the user home dir
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
43 p = sys::Path::GetUserHomeDirectory();
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
44 p.appendComponent(filename);
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
45
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
46 if (!p.exists())
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
47 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
48 // 3) try the install-prefix/etc
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
49 p = sys::Path(LDC_INSTALL_PREFIX);
1114
454f0c8acc4b Hopefully fix #232
Frits van Bommel <fvbommel wxs.nl>
parents: 1103
diff changeset
50 #if !_WIN32
454f0c8acc4b Hopefully fix #232
Frits van Bommel <fvbommel wxs.nl>
parents: 1103
diff changeset
51 // Does Window need something similar?
454f0c8acc4b Hopefully fix #232
Frits van Bommel <fvbommel wxs.nl>
parents: 1103
diff changeset
52 p.appendComponent("etc");
454f0c8acc4b Hopefully fix #232
Frits van Bommel <fvbommel wxs.nl>
parents: 1103
diff changeset
53 #endif
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
54 p.appendComponent(filename);
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
55
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
56 if (!p.exists())
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
57 {
1473
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
58 #if _WIN32
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
59 char buf[256];
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
60 GetModuleFileName(NULL, buf, 256);
1475
1f29cbc36bf5 Fix memory leak in configfile.cpp...probably the only one in ldc!
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1473
diff changeset
61 p = buf;
1473
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
62 #else
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
63 // 4) try next to the executable
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
64 p = sys::Path::GetMainExecutable(argv0, mainAddr);
1473
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
65 #endif
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
66 p.eraseComponent();
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
67 p.appendComponent(filename);
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
68 if (!p.exists())
1473
8309ebaa23d5 Fix for finding ldc.conf file with mingw
Kelly Wilson <wilsonk cpsc.ucalgary.ca>
parents: 1340
diff changeset
69 {
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
70 // 5) fail load cfg, users still have the DFLAGS environment var
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
71 std::cerr << "Error failed to locate the configuration file: " << filename << std::endl;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
72 return false;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
73 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
74 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
75 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
76 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
77
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
78 try
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
79 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
80 // read the cfg
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
81 cfg->readFile(p.c_str());
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
82
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
83 // make sure there's a default group
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
84 if (!cfg->exists("default"))
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
85 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
86 std::cerr << "no default settings in configuration file" << std::endl;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
87 return false;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
88 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
89 libconfig::Setting& root = cfg->lookup("default");
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
90 if (!root.isGroup())
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
91 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
92 std::cerr << "default is not a group" << std::endl;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
93 return false;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
94 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
95
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
96 // handle switches
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
97 if (root.exists("switches"))
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
98 {
1340
206329112670 Fix the ldcbinarypath config file rewriting.
Christian Kamm <kamm incasoftware de>
parents: 1339
diff changeset
99 std::string binpathkey = "%%ldcbinarypath%%";
206329112670 Fix the ldcbinarypath config file rewriting.
Christian Kamm <kamm incasoftware de>
parents: 1339
diff changeset
100 std::string binpath = sys::Path::GetMainExecutable(argv0, mainAddr).getDirname();
206329112670 Fix the ldcbinarypath config file rewriting.
Christian Kamm <kamm incasoftware de>
parents: 1339
diff changeset
101
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
102 libconfig::Setting& arr = cfg->lookup("default.switches");
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
103 int len = arr.getLength();
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
104 for (int i=0; i<len; i++)
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
105 {
1337
b6e819244062 In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
Christian Kamm <kamm incasoftware de>
parents: 1114
diff changeset
106 std::string v = arr[i];
b6e819244062 In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
Christian Kamm <kamm incasoftware de>
parents: 1114
diff changeset
107
b6e819244062 In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
Christian Kamm <kamm incasoftware de>
parents: 1114
diff changeset
108 // replace binpathkey with binpath
b6e819244062 In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
Christian Kamm <kamm incasoftware de>
parents: 1114
diff changeset
109 size_t p;
b6e819244062 In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
Christian Kamm <kamm incasoftware de>
parents: 1114
diff changeset
110 while (std::string::npos != (p = v.find(binpathkey)))
b6e819244062 In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
Christian Kamm <kamm incasoftware de>
parents: 1114
diff changeset
111 v.replace(p, binpathkey.size(), binpath);
1340
206329112670 Fix the ldcbinarypath config file rewriting.
Christian Kamm <kamm incasoftware de>
parents: 1339
diff changeset
112
1337
b6e819244062 In config file: replace %%ldcbinarypath%% with the path to the ldc executable.
Christian Kamm <kamm incasoftware de>
parents: 1114
diff changeset
113 switches.push_back(strdup(v.c_str()));
1103
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
114 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
115 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
116
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
117 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
118 catch(libconfig::FileIOException& fioe)
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
119 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
120 std::cerr << "Error reading configuration file: " << filename << std::endl;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
121 return false;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
122 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
123 catch(libconfig::ParseException& pe)
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
124 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
125 std::cerr << "Error parsing configuration file: " << filename
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
126 << "(" << pe.getLine() << "): " << pe.getError() << std::endl;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
127 return false;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
128 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
129 catch(...)
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
130 {
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
131 std::cerr << "Unknown exception caught!" << std::endl;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
132 return false;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
133 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
134
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
135 return true;
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
136 }
b30fe7e1dbb9 - Updated to DMD frontend 1.041.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff changeset
137