aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lli
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index d8f2b16..be9f999 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -59,11 +59,10 @@ int main(int argc, char **argv, char * const *envp) {
// Load the bytecode...
std::string ErrorMsg;
ModuleProvider *MP = 0;
- try {
- MP = getBytecodeModuleProvider(InputFile);
- } catch (std::string &err) {
+ MP = getBytecodeModuleProvider(InputFile, &ErrorMsg);
+ if (!MP) {
std::cerr << "Error loading program '" << InputFile << "': "
- << err << "\n";
+ << ErrorMsg << "\n";
exit(1);
}