lix/src/libutil/rust-ffi.cc
2019-11-26 22:07:28 +01:00

13 lines
244 B
C++

#include "logging.hh"
#include "rust.hh"
namespace nix {
extern "C" std::exception_ptr * make_error(rust::StringSlice s)
{
// FIXME: leak
return new std::exception_ptr(std::make_exception_ptr(Error(std::string(s.ptr, s.size))));
}
}