mirror of https://github.com/KLayout/klayout.git
Fixed Windows builds, enhanced unit test framework with error messages upon exceptions.
This commit is contained in:
parent
cb1589b2ba
commit
b7d1d22fb2
|
|
@ -684,7 +684,7 @@ struct writer<gsi::ObjectType>
|
|||
try {
|
||||
// Note: this const_cast is ugly, but it will basically enable "out" parameters
|
||||
// TODO: clean this up.
|
||||
gsi::do_on_type<writer> () (a->type (), &arglist, (arg->get_list ().begin () + narg).operator-> (), *a, heap);
|
||||
gsi::do_on_type<writer> () (a->type (), &arglist, const_cast<tl::Variant *> ((arg->get_list ().begin () + narg).operator-> ()), *a, heap);
|
||||
} catch (tl::Exception &ex) {
|
||||
std::string msg = ex.msg () + tl::sprintf (tl::to_string (tr (" (argument '%s')")), a->spec ()->name ());
|
||||
throw tl::Exception (msg);
|
||||
|
|
|
|||
|
|
@ -267,6 +267,8 @@ bool TestBase::do_test (bool editable, bool slow)
|
|||
|
||||
try {
|
||||
execute (this);
|
||||
} catch (tl::CancelException &) {
|
||||
throw;
|
||||
} catch (tl::Exception &ex) {
|
||||
raise (std::string ("Exception caught: ") + ex.msg ());
|
||||
} catch (std::runtime_error &ex) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue