63 {
64 static std::mutex s_mutex;
65
66 try
67 {
68 auto start_usage = std::chrono::steady_clock::now();
69
71
73
74 if (!
m_kernel.get_bind_classes_status().empty() || !
m_kernel.get_bind_objects_status().empty())
75 {
76 std::lock_guard lock(s_mutex);
77
79 {
81
82 if (!
m_kernel.get_bind_classes_status().empty())
83 {
84 s_load_error +=
"the schema contains dangling references to non-loaded classes:\n";
86 }
87
88 if (!
m_kernel.get_bind_objects_status().empty())
89 {
90 s_load_error +=
"the data contain dangling references to non-loaded objects:\n";
92 }
93 }
94 }
95
96 static std::mutex s_log_mutex;
97 std::lock_guard scoped_lock(s_log_mutex);
98
99 log_timestamp() <<
"validated file \"" <<
m_file_name <<
"\" in " << std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now()-start_usage).count() / 1000. <<
" ms\n";
100 }
101 catch (std::exception& ex)
102 {
103 std::lock_guard lock(s_mutex);
104
106 {
109
110 const std::string& user_repository(
m_kernel.get_user_repository_root());
111 const std::size_t user_repository_len(
m_kernel.get_user_repository_root().length() + 1);
112
113 std::size_t pos;
114 while ((pos =
s_load_error.find(user_repository)) != std::string::npos)
116 }
117 }
118 }
std::ostream & log_timestamp(__LogSeverity__ severity=Log)
static void init_file_load_error(const std::string &file)