Commit fd2f7920 authored by Maximilien Colange's avatar Maximilien Colange
Browse files

Improve error messages when loading compiled models.

* spot/ltsmin/ltsmin.cc: Improve error messages.
parent c9aabcdd
...@@ -1017,9 +1017,10 @@ namespace spot ...@@ -1017,9 +1017,10 @@ namespace spot
lt_dlhandle h = lt_dlopen(file.c_str()); lt_dlhandle h = lt_dlopen(file.c_str());
if (!h) if (!h)
{ {
std::string lt_error = lt_dlerror();
lt_dlexit(); lt_dlexit();
throw std::runtime_error(std::string("Failed to load '") throw std::runtime_error(std::string("Failed to load '")
+ file + "'."); + file + "'.\n" + lt_error);
} }
auto d = std::make_shared<spins_interface>(); auto d = std::make_shared<spins_interface>();
...@@ -1106,7 +1107,7 @@ namespace spot ...@@ -1106,7 +1107,7 @@ namespace spot
&& d->get_type_name && d->get_type_name
&& d->get_type_value_count && d->get_type_value_count
&& d->get_type_value_name)) && d->get_type_value_name))
throw std::runtime_error(std::string("Failed resolve some symbol" throw std::runtime_error(std::string("Failed to resolve some symbol "
"while loading '") + file + "'."); "while loading '") + file + "'.");
if (d->have_property && d->have_property()) if (d->have_property && d->have_property())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment